pub type SocketId<BC> = DeviceSocketId<WeakDeviceId<BC>, BC>;
Expand description
Public identifier for a socket.
Strongly owns the state of the socket. So long as the SocketId
for a
socket is not dropped, the socket is guaranteed to exist.
Aliased Type§
struct SocketId<BC>(/* private fields */);
Implementations
Source§impl<D: Send + Sync + Debug, BT: DeviceSocketTypes> DeviceSocketId<D, BT>
impl<D: Send + Sync + Debug, BT: DeviceSocketTypes> DeviceSocketId<D, BT>
Sourcepub fn socket_state(&self) -> &BT::SocketState<D>
pub fn socket_state(&self) -> &BT::SocketState<D>
Provides immutable access to DeviceSocketTypes::SocketState
for the
socket.
Sourcepub fn downgrade(&self) -> WeakDeviceSocketId<D, BT>
pub fn downgrade(&self) -> WeakDeviceSocketId<D, BT>
Obtain a WeakDeviceSocketId
from this DeviceSocketId
.
Sourcepub fn counters(&self) -> &DeviceSocketCounters
pub fn counters(&self) -> &DeviceSocketCounters
Provides access to the socket’s counters.