Struct smoltcp::socket::SocketSet

source ·
pub struct SocketSet<'a, 'b: 'a, 'c: 'a + 'b> { /* private fields */ }
Expand description

An extensible set of sockets.

The lifetimes 'b and 'c are used when storing a Socket<'b, 'c>.

Implementations§

Create a socket set using the provided storage.

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

Panics

This function panics if the storage is fixed-size (not a Vec) and is full.

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

Panics

This function may panic if the handle does not belong to this socket set or the socket has the wrong type.

Remove a socket from the set, without changing its state.

Panics

This function may panic if the handle does not belong to this socket set.

Increase reference count by 1.

Panics

This function may panic if the handle does not belong to this socket set.

Decrease reference count by 1.

Panics

This function may panic if the handle does not belong to this socket set, or if the reference count is already zero.

Prune the sockets in this set.

Pruning affects sockets with reference count 0. Open sockets are closed. Closed 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

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.