@@ -630,6 +630,9 @@ impl Shard {
630630 /// # }
631631 /// ```
632632 ///
633+ /// # Errors
634+ /// Errors if there is a problem with the WS connection.
635+ ///
633636 /// [`Event::GuildMembersChunk`]: crate::model::event::Event::GuildMembersChunk
634637 /// [`Guild`]: crate::model::guild::Guild
635638 /// [`Member`]: crate::model::guild::Member
@@ -650,6 +653,9 @@ impl Shard {
650653 /// Sets the shard as going into identifying stage, which sets:
651654 /// - the time that the last heartbeat sent as being now
652655 /// - the `stage` to [`ConnectionStage::Identifying`]
656+ ///
657+ /// # Errors
658+ /// Errors if there is a problem with the WS connection.
653659 #[ instrument( skip( self ) ) ]
654660 pub async fn identify ( & mut self ) -> Result < ( ) > {
655661 self . client . send_identify ( & self . info , & self . token , self . intents , & self . presence ) . await ?;
@@ -663,6 +669,10 @@ impl Shard {
663669 /// Initializes a new WebSocket client.
664670 ///
665671 /// This will set the stage of the shard before and after instantiation of the client.
672+ ///
673+ /// # Errors
674+ ///
675+ /// Errors if unable to establish a websocket connection.
666676 #[ instrument( skip( self ) ) ]
667677 pub async fn initialize ( & mut self ) -> Result < WsClient > {
668678 debug ! ( "[{:?}] Initializing." , self . info) ;
@@ -694,6 +704,9 @@ impl Shard {
694704 self . seq = 0 ;
695705 }
696706
707+ /// # Errors
708+ ///
709+ /// Errors if unable to re-establish a websocket connection.
697710 #[ instrument( skip( self ) ) ]
698711 pub async fn resume ( & mut self ) -> Result < ( ) > {
699712 debug ! ( "[{:?}] Attempting to resume" , self . info) ;
@@ -709,6 +722,9 @@ impl Shard {
709722 }
710723 }
711724
725+ /// # Errors
726+ ///
727+ /// Errors if unable to re-establish a websocket connection.
712728 #[ instrument( skip( self ) ) ]
713729 pub async fn reconnect ( & mut self ) -> Result < ( ) > {
714730 info ! ( "[{:?}] Attempting to reconnect" , self . shard_info( ) ) ;
@@ -719,6 +735,9 @@ impl Shard {
719735 Ok ( ( ) )
720736 }
721737
738+ /// # Errors
739+ ///
740+ /// Errors if there is a problem with the WS connection.
722741 #[ instrument( skip( self ) ) ]
723742 pub async fn update_presence ( & mut self ) -> Result < ( ) > {
724743 self . client . send_presence_update ( & self . info , & self . presence ) . await
0 commit comments