pub struct SocketSet<const TIMER_HZ: u32, const N: usize, const L: usize> {
    pub sockets: Vec<Option<Socket<TIMER_HZ, L>>, N>,
}
Expand description

An extensible set of sockets.

Fields

sockets: Vec<Option<Socket<TIMER_HZ, L>>, N>

Implementations

Create a socket set using the provided storage.

Get the maximum number of sockets the set can hold

Get the current number of initialized sockets, the set is holding

Check if the set is currently holding no active sockets

Get the type of a specific socket in the set.

Returned as a SocketType

Add a socket to the set with the reference count 1, and return its handle.

Get a socket from the set by its handle, as mutable.

Remove a socket from the set

Prune the sockets in this set.

All sockets are removed and dropped.

Iterate every socket in this set.

Iterate every socket in this set, as SocketRef.

Trait Implementations

Formats the value using the given formatter. Read more
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.

Should always be Self
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.