pub struct RawIpSocketId<I, D, BT>(/* private fields */)
where
I: IpExt,
D: WeakDeviceIdentifier,
BT: RawIpSocketsBindingsTypes;
Expand description
Reference to the state of a live socket.
Implementations§
Source§impl<I, D, BT> RawIpSocketId<I, D, BT>
impl<I, D, BT> RawIpSocketId<I, D, BT>
Sourcepub fn external_state(
&self,
) -> &<BT as RawIpSocketsBindingsTypes>::RawIpSocketState<I>
pub fn external_state( &self, ) -> &<BT as RawIpSocketsBindingsTypes>::RawIpSocketState<I>
Return the bindings state associated with this socket.
Sourcepub fn protocol(&self) -> &RawIpSocketProtocol<I>
pub fn protocol(&self) -> &RawIpSocketProtocol<I>
Return the protocol associated with this socket.
Sourcepub fn downgrade(&self) -> WeakRawIpSocketId<I, D, BT>
pub fn downgrade(&self) -> WeakRawIpSocketId<I, D, BT>
Downgrades this ID to a weak reference.
Sourcepub fn state(&self) -> &RawIpSocketState<I, D, BT>
pub fn state(&self) -> &RawIpSocketState<I, D, BT>
Gets the socket state.
Trait Implementations§
Source§impl<I, D, BT> Clone for RawIpSocketId<I, D, BT>
impl<I, D, BT> Clone for RawIpSocketId<I, D, BT>
Source§fn clone(&self) -> RawIpSocketId<I, D, BT>
fn clone(&self) -> RawIpSocketId<I, D, BT>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<I, D, BT> Debug for RawIpSocketId<I, D, BT>
impl<I, D, BT> Debug for RawIpSocketId<I, D, BT>
Source§impl<I, D, BT, IpType> GenericOverIp<IpType> for RawIpSocketId<I, D, BT>
impl<I, D, BT, IpType> GenericOverIp<IpType> for RawIpSocketId<I, D, BT>
Source§type Type = RawIpSocketId<IpType, D, BT>
type Type = RawIpSocketId<IpType, D, BT>
The type of
Self
when its IP-generic parameter is replaced with the
type NewIp
.Source§impl<I, D, BT> Hash for RawIpSocketId<I, D, BT>
impl<I, D, BT> Hash for RawIpSocketId<I, D, BT>
Source§impl<I, D, BT> PartialEq for RawIpSocketId<I, D, BT>
impl<I, D, BT> PartialEq for RawIpSocketId<I, D, BT>
Source§impl<I: IpExt, BC: BindingsContext, L, D: WeakDeviceIdentifier> ResourceCounterContext<RawIpSocketId<I, D, BC>, RawIpSocketCounters<I>> for CoreCtx<'_, BC, L>
impl<I: IpExt, BC: BindingsContext, L, D: WeakDeviceIdentifier> ResourceCounterContext<RawIpSocketId<I, D, BC>, RawIpSocketCounters<I>> for CoreCtx<'_, BC, L>
Source§fn with_per_resource_counters<O, F: FnOnce(&RawIpSocketCounters<I>) -> O>(
&mut self,
id: &RawIpSocketId<I, D, BC>,
cb: F,
) -> O
fn with_per_resource_counters<O, F: FnOnce(&RawIpSocketCounters<I>) -> O>( &mut self, id: &RawIpSocketId<I, D, BC>, cb: F, ) -> O
Call
cb
with an immutable reference to the set of counters on resource
.impl<I, D, BT> Eq for RawIpSocketId<I, D, BT>
Auto Trait Implementations§
impl<I, D, BT> Freeze for RawIpSocketId<I, D, BT>
impl<I, D, BT> RefUnwindSafe for RawIpSocketId<I, D, BT>where
<BT as RawIpSocketsBindingsTypes>::RawIpSocketState<I>: RefUnwindSafe,
<I as IpProtoExt>::Proto: RefUnwindSafe,
I: RefUnwindSafe,
impl<I, D, BT> Send for RawIpSocketId<I, D, BT>
impl<I, D, BT> Sync for RawIpSocketId<I, D, BT>
impl<I, D, BT> Unpin for RawIpSocketId<I, D, BT>
impl<I, D, BT> UnwindSafe for RawIpSocketId<I, D, BT>where
<BT as RawIpSocketsBindingsTypes>::RawIpSocketState<I>: RefUnwindSafe,
<I as IpProtoExt>::Proto: RefUnwindSafe,
I: RefUnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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
Source§impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
Source§type Data = <L as UnlockedAccessMarkerFor<T>>::Data
type Data = <L as UnlockedAccessMarkerFor<T>>::Data
The type of state being accessed.
Source§type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data
where
T: 'l
type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data where T: 'l
A guard providing read access to the data.
Source§fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
How to access the state.