pub struct SessionManagerBuilder<S: StateStorage + 'static, M: MessagesManagerTrait + 'static> {
storage: Arc<S>,
messages_manager: Arc<M>,
client_keypair: Option<Arc<KeyPair>>,
}Expand description
Builder for creating a SessionManager with proper initialization
Fields§
§storage: Arc<S>§messages_manager: Arc<M>§client_keypair: Option<Arc<KeyPair>>Implementations§
Source§impl<S: StateStorage + 'static, M: MessagesManagerTrait + 'static> SessionManagerBuilder<S, M>
impl<S: StateStorage + 'static, M: MessagesManagerTrait + 'static> SessionManagerBuilder<S, M>
Sourcepub fn new(storage: Arc<S>, messages_manager: Arc<M>) -> Self
pub fn new(storage: Arc<S>, messages_manager: Arc<M>) -> Self
Create a new SessionManager builder
pub fn client_keypair(self, client_keypair: Arc<KeyPair>) -> Self
Sourcepub async fn build(self) -> SessionManagerResult<SessionManager<S, M>>
pub async fn build(self) -> SessionManagerResult<SessionManager<S, M>>
Build the SessionManager, loading all states from storage and setting up listeners
Auto Trait Implementations§
impl<S, M> Freeze for SessionManagerBuilder<S, M>
impl<S, M> RefUnwindSafe for SessionManagerBuilder<S, M>where
S: RefUnwindSafe,
M: RefUnwindSafe,
impl<S, M> Send for SessionManagerBuilder<S, M>
impl<S, M> Sync for SessionManagerBuilder<S, M>
impl<S, M> Unpin for SessionManagerBuilder<S, M>
impl<S, M> UnwindSafe for SessionManagerBuilder<S, M>where
S: RefUnwindSafe,
M: RefUnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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