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

A fixed-capacity session map that uses linear search to find sessions

This implementation offers configurable memory use. Its time complexity is O(C).

Type parameters:

  • I: A time instant
  • N: A node ID
  • T: A transfer ID
  • D: Additional transport-specific session data
  • C (usize): Maximum number of sessions to store simultaneously

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.