Skip to main content

SessionManager

Trait SessionManager 

Source
pub trait SessionManager {
    // Required methods
    fn open_session(
        &mut self,
        domain: TransportDomain,
        target: impl Into<String>,
    ) -> SessionId;
    fn get_session(&self, id: SessionId) -> Option<&SessionRecord>;
    fn set_backoff_policy(&mut self, policy: ReconnectBackoffPolicy);
    fn mark_connected(&mut self, id: SessionId);
    fn mark_reconnecting(&mut self, id: SessionId, reason: impl Into<String>);
    fn mark_closed(&mut self, id: SessionId);
}

Required Methods§

Source

fn open_session( &mut self, domain: TransportDomain, target: impl Into<String>, ) -> SessionId

Source

fn get_session(&self, id: SessionId) -> Option<&SessionRecord>

Source

fn set_backoff_policy(&mut self, policy: ReconnectBackoffPolicy)

Source

fn mark_connected(&mut self, id: SessionId)

Source

fn mark_reconnecting(&mut self, id: SessionId, reason: impl Into<String>)

Source

fn mark_closed(&mut self, id: SessionId)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§