pub struct WebexMessageHandler { /* private fields */ }Expand description
Receives and decrypts Webex messages over Mercury WebSocket.
Implementations§
Source§impl WebexMessageHandler
impl WebexMessageHandler
Sourcepub fn new(config: Config) -> Result<Self, WebexError>
pub fn new(config: Config) -> Result<Self, WebexError>
Create a new WebexMessageHandler.
Sourcepub async fn take_event_rx(&self) -> Option<UnboundedReceiver<HandlerEvent>>
pub async fn take_event_rx(&self) -> Option<UnboundedReceiver<HandlerEvent>>
Take the event receiver. Can only be called once.
Sourcepub async fn connect(&self) -> Result<(), WebexError>
pub async fn connect(&self) -> Result<(), WebexError>
Connect to Webex (register device, connect Mercury, init KMS).
Sourcepub async fn disconnect(&self)
pub async fn disconnect(&self)
Disconnect from Webex.
Sourcepub async fn reconnect(&self, new_token: &str) -> Result<(), WebexError>
pub async fn reconnect(&self, new_token: &str) -> Result<(), WebexError>
Update the access token and re-establish the connection.
Sourcepub async fn status(&self) -> HandlerStatus
pub async fn status(&self) -> HandlerStatus
Returns a structured health check of all connection subsystems.
Auto Trait Implementations§
impl Freeze for WebexMessageHandler
impl !RefUnwindSafe for WebexMessageHandler
impl Send for WebexMessageHandler
impl Sync for WebexMessageHandler
impl Unpin for WebexMessageHandler
impl !UnwindSafe for WebexMessageHandler
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