pub struct SessionArray<I, T, D, const C: usize> where
    I: Instant
{ /* private fields */ }
Expand description

A fixed-capacity array of sessions, with one session slot for each possible node ID

C must be one greater than the maximum node ID value.

This implementation uses a consistent large amount of memory and operates in constant time. Its insert function never fails.

Trait Implementations

Returns a reference to the session for the provided node, if one exists

Returns a mutable reference to the session for the provided node, if one exists

Returns a mutable reference to the session for the provided node Read more

Inserts a session Read more

Removes all sessions that have expired

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.