Struct cometd_client::CometdClient
source · pub struct CometdClient { /* private fields */ }Expand description
A cometd Client.
Implementations§
source§impl CometdClient
impl CometdClient
sourcepub async fn connect<Msg>(&self) -> CometdResult<Vec<Data<Msg>>>where
Msg: DeserializeOwned,
pub async fn connect<Msg>(&self) -> CometdResult<Vec<Data<Msg>>>where
Msg: DeserializeOwned,
source§impl CometdClient
impl CometdClient
sourcepub async fn disconnect(&self) -> CometdResult<()>
pub async fn disconnect(&self) -> CometdResult<()>
source§impl CometdClient
impl CometdClient
sourcepub async fn handshake(&self) -> CometdResult<()>
pub async fn handshake(&self) -> CometdResult<()>
source§impl CometdClient
impl CometdClient
source§impl CometdClient
impl CometdClient
sourcepub fn update_access_token<AT>(&self, access_token: AT)where
AT: AccessToken + 'static,
pub fn update_access_token<AT>(&self, access_token: AT)where
AT: AccessToken + 'static,
Method for update access token.
Example
let access_token = Basic::create("username", Some("password")).unwrap();
client.update_access_token(access_token);