pub enum SocketState<I: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> {
Unbound(UnboundSocketState<I, D, S>),
Bound(BoundSocketState<I, D, S>),
}
Expand description
A datagram socket’s state.
Variants§
Unbound(UnboundSocketState<I, D, S>)
Bound(BoundSocketState<I, D, S>)
Implementations§
Source§impl<I: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> SocketState<I, D, S>
impl<I: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> SocketState<I, D, S>
Sourcepub fn record_common_info<N>(
&self,
inspector: &mut N,
socket_id: &S::SocketId<I, D>,
)where
N: Inspector + InspectorDeviceExt<D>,
pub fn record_common_info<N>(
&self,
inspector: &mut N,
socket_id: &S::SocketId<I, D>,
)where
N: Inspector + InspectorDeviceExt<D>,
Record inspect information generic to each datagram protocol.
Sourcepub fn get_options_device<'a, BC, CC: DatagramBoundStateContext<I, BC, S, WeakDeviceId = D>>(
&'a self,
core_ctx: &mut CC,
) -> (&'a IpOptions<I, CC::WeakDeviceId, S>, &'a Option<CC::WeakDeviceId>)
pub fn get_options_device<'a, BC, CC: DatagramBoundStateContext<I, BC, S, WeakDeviceId = D>>( &'a self, core_ctx: &mut CC, ) -> (&'a IpOptions<I, CC::WeakDeviceId, S>, &'a Option<CC::WeakDeviceId>)
Gets the IpOptions
and bound device for the socket state.
Trait Implementations§
Source§impl<I: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> AsRef<IpOptions<I, D, S>> for SocketState<I, D, S>
impl<I: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> AsRef<IpOptions<I, D, S>> for SocketState<I, D, S>
Source§impl<I: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> Debug for SocketState<I, D, S>
impl<I: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> Debug for SocketState<I, D, S>
Source§impl<I: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec, IpType> GenericOverIp<IpType> for SocketState<I, D, S>
impl<I: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec, IpType> GenericOverIp<IpType> for SocketState<I, D, S>
Source§type Type = SocketState<IpType, D, S>
type Type = SocketState<IpType, D, S>
The type of
Self
when its IP-generic parameter is replaced with the
type NewIp
.Source§impl<I: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> OrderedLockAccess<SocketState<I, D, S>> for ReferenceState<I, D, S>
impl<I: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> OrderedLockAccess<SocketState<I, D, S>> for ReferenceState<I, D, S>
Source§type Lock = RwLock<SocketState<I, D, S>>
type Lock = RwLock<SocketState<I, D, S>>
The lock type that observes ordering. Read more
Source§fn ordered_lock_access(&self) -> OrderedLockRef<'_, Self::Lock>
fn ordered_lock_access(&self) -> OrderedLockRef<'_, Self::Lock>
Returns a borrow to the order-aware lock. Read more
Auto Trait Implementations§
impl<I, D, S> Freeze for SocketState<I, D, S>where
<I as DualStackIpExt>::OtherVersion: Sized,
<S as DatagramSocketSpec>::SharingState: Freeze,
D: Freeze,
<S as DatagramSocketSpec>::OtherStackIpOptions<I, D>: Freeze,
<S as DatagramSocketSpec>::ConnState<I, D>: Freeze,
<S as DatagramSocketSpec>::ListenerIpAddr<I>: Freeze,
<I as BroadcastIpExt>::BroadcastMarker: Freeze,
impl<I, D, S> RefUnwindSafe for SocketState<I, D, S>where
<I as DualStackIpExt>::OtherVersion: Sized,
<S as DatagramSocketSpec>::SharingState: RefUnwindSafe,
D: RefUnwindSafe,
<S as DatagramSocketSpec>::OtherStackIpOptions<I, D>: RefUnwindSafe,
<S as DatagramSocketSpec>::ConnState<I, D>: RefUnwindSafe,
<S as DatagramSocketSpec>::ListenerIpAddr<I>: RefUnwindSafe,
<I as BroadcastIpExt>::BroadcastMarker: RefUnwindSafe,
I: RefUnwindSafe,
<I as Ip>::Addr: RefUnwindSafe,
impl<I, D, S> Send for SocketState<I, D, S>
impl<I, D, S> Sync for SocketState<I, D, S>
impl<I, D, S> Unpin for SocketState<I, D, S>where
<I as DualStackIpExt>::OtherVersion: Sized,
<S as DatagramSocketSpec>::SharingState: Unpin,
D: Unpin,
<S as DatagramSocketSpec>::OtherStackIpOptions<I, D>: Unpin,
<S as DatagramSocketSpec>::ConnState<I, D>: Unpin,
<S as DatagramSocketSpec>::ListenerIpAddr<I>: Unpin,
<I as BroadcastIpExt>::BroadcastMarker: Unpin,
I: Unpin,
<I as Ip>::Addr: Unpin,
impl<I, D, S> UnwindSafe for SocketState<I, D, S>where
<I as DualStackIpExt>::OtherVersion: Sized,
<S as DatagramSocketSpec>::SharingState: UnwindSafe,
D: UnwindSafe,
<S as DatagramSocketSpec>::OtherStackIpOptions<I, D>: UnwindSafe,
<S as DatagramSocketSpec>::ConnState<I, D>: UnwindSafe,
<S as DatagramSocketSpec>::ListenerIpAddr<I>: UnwindSafe,
<I as BroadcastIpExt>::BroadcastMarker: UnwindSafe,
I: UnwindSafe,
<I as Ip>::Addr: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send a frame. Read more
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more