pub struct ClientManager { /* private fields */ }Expand description
Manager struct for a [RealtimeClient]
Returned by RealtimeClientBuilder::connect()
Implementations§
Source§impl ClientManager
impl ClientManager
Sourcepub async fn disconnect(&self) -> Result<RealtimeClientBuilder, RecvError>
pub async fn disconnect(&self) -> Result<RealtimeClientBuilder, RecvError>
Disconnect the client Returns a preconfigured RealtimeClientBuilder for modification or reinstantiation
Sourcepub async fn get_state(&self) -> Result<ClientState, RecvError>
pub async fn get_state(&self) -> Result<ClientState, RecvError>
Returns the current ClientState
Sourcepub fn get_rt(&self) -> Arc<Runtime>
pub fn get_rt(&self) -> Arc<Runtime>
Returns an Arc referencing the client’s internal tokio runtime
Sourcepub async fn get_access_token(&self) -> Result<String, RecvError>
pub async fn get_access_token(&self) -> Result<String, RecvError>
Returns the current access token used by this client
Sourcepub async fn get_access_token_arc(
&self,
) -> Result<Arc<Mutex<String>>, RecvError>
pub async fn get_access_token_arc( &self, ) -> Result<Arc<Mutex<String>>, RecvError>
Returns an Arc<Mutex
Sourcepub async fn set_access_token(
&self,
access_token: String,
) -> Result<String, RecvError>
pub async fn set_access_token( &self, access_token: String, ) -> Result<String, RecvError>
Modify the client’s access token This change cascades through all connected channels and sends the appropriate messages to the server
Sourcepub fn to_sync(self) -> ClientManagerSync
pub fn to_sync(self) -> ClientManagerSync
Return a sync wrapper ClientManagerSync for this manager
Trait Implementations§
Source§impl Clone for ClientManager
impl Clone for ClientManager
Source§fn clone(&self) -> ClientManager
fn clone(&self) -> ClientManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ClientManager
impl RefUnwindSafe for ClientManager
impl Send for ClientManager
impl Sync for ClientManager
impl Unpin for ClientManager
impl UnwindSafe for ClientManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more