pub struct SessionManager {
    pub sessions: HashMap<NodeId, Arc<RwLock<Session>>>,
    pub sessions_terminated: bool,
}

Fields

sessions: HashMap<NodeId, Arc<RwLock<Session>>>sessions_terminated: bool

Implementations

Puts all sessions into a terminated state and clears the map

Find a session by its session id and return it.

Finds the session by its authentication token and returns it. The authentication token can be renewed so it is not used as a key.

Register the session in the map so it can be searched on

Deregisters a session from the map

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.