pub struct ConnState<WireI: IpExt, SocketI: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec + ?Sized> { /* private fields */ }
Expand description
State associated with a connected socket.
Implementations§
Source§impl<WireI: IpExt, SocketI: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> ConnState<WireI, SocketI, D, S>
impl<WireI: IpExt, SocketI: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> ConnState<WireI, SocketI, D, S>
Sourcepub fn should_receive(&self) -> bool
pub fn should_receive(&self) -> bool
Returns true if the connection can receive traffic.
Sourcepub fn addr(
&self,
) -> &ConnAddr<ConnIpAddr<WireI::Addr, <S::AddrSpec as SocketMapAddrSpec>::LocalIdentifier, <S::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier>, D>
pub fn addr( &self, ) -> &ConnAddr<ConnIpAddr<WireI::Addr, <S::AddrSpec as SocketMapAddrSpec>::LocalIdentifier, <S::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier>, D>
Returns the bound addresses for the connection.
Sourcepub fn extra(&self) -> &S::ConnStateExtra
pub fn extra(&self) -> &S::ConnStateExtra
Returns the extra opaque information kept in connected state.
Trait Implementations§
Source§impl<WireI: IpExt, SocketI: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> AsMut<IpOptions<SocketI, D, S>> for ConnState<WireI, SocketI, D, S>
impl<WireI: IpExt, SocketI: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> AsMut<IpOptions<SocketI, D, S>> for ConnState<WireI, SocketI, D, S>
Source§impl<WireI: IpExt, SocketI: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> AsMut<Shutdown> for ConnState<WireI, SocketI, D, S>
impl<WireI: IpExt, SocketI: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> AsMut<Shutdown> for ConnState<WireI, SocketI, D, S>
Source§impl<WireI: IpExt, SocketI: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> AsRef<IpOptions<SocketI, D, S>> for ConnState<WireI, SocketI, D, S>
impl<WireI: IpExt, SocketI: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> AsRef<IpOptions<SocketI, D, S>> for ConnState<WireI, SocketI, D, S>
Source§impl<WireI: IpExt, SocketI: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> AsRef<Shutdown> for ConnState<WireI, SocketI, D, S>
impl<WireI: IpExt, SocketI: IpExt, D: WeakDeviceIdentifier, S: DatagramSocketSpec> AsRef<Shutdown> for ConnState<WireI, SocketI, D, S>
Auto Trait Implementations§
impl<WireI, SocketI, D, S> Freeze for ConnState<WireI, SocketI, D, S>where
<SocketI as DualStackIpExt>::OtherVersion: Sized,
<WireI as DualStackIpExt>::OtherVersion: Sized,
<S as DatagramSocketSpec>::ConnStateExtra: Freeze,
<S as DatagramSocketSpec>::OtherStackIpOptions<SocketI, D>: Freeze,
<WireI as IpProtoExt>::Proto: Freeze,
D: Freeze,
<SocketI as BroadcastIpExt>::BroadcastMarker: Freeze,
<<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::LocalIdentifier: Freeze,
<<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier: Freeze,
<WireI as Ip>::Addr: Freeze,
impl<WireI, SocketI, D, S> RefUnwindSafe for ConnState<WireI, SocketI, D, S>where
<SocketI as DualStackIpExt>::OtherVersion: Sized,
<WireI as DualStackIpExt>::OtherVersion: Sized,
<S as DatagramSocketSpec>::ConnStateExtra: RefUnwindSafe,
<S as DatagramSocketSpec>::OtherStackIpOptions<SocketI, D>: RefUnwindSafe,
<WireI as IpProtoExt>::Proto: RefUnwindSafe,
D: RefUnwindSafe,
<SocketI as BroadcastIpExt>::BroadcastMarker: RefUnwindSafe,
<<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::LocalIdentifier: RefUnwindSafe,
<<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier: RefUnwindSafe,
<WireI as Ip>::Addr: RefUnwindSafe,
SocketI: RefUnwindSafe,
<SocketI as Ip>::Addr: RefUnwindSafe,
impl<WireI, SocketI, D, S> Send for ConnState<WireI, SocketI, D, S>where
<SocketI as DualStackIpExt>::OtherVersion: Sized,
<WireI as DualStackIpExt>::OtherVersion: Sized,
impl<WireI, SocketI, D, S> Sync for ConnState<WireI, SocketI, D, S>where
<SocketI as DualStackIpExt>::OtherVersion: Sized,
<WireI as DualStackIpExt>::OtherVersion: Sized,
impl<WireI, SocketI, D, S> Unpin for ConnState<WireI, SocketI, D, S>where
<SocketI as DualStackIpExt>::OtherVersion: Sized,
<WireI as DualStackIpExt>::OtherVersion: Sized,
<S as DatagramSocketSpec>::ConnStateExtra: Unpin,
<S as DatagramSocketSpec>::OtherStackIpOptions<SocketI, D>: Unpin,
<WireI as IpProtoExt>::Proto: Unpin,
D: Unpin,
<SocketI as BroadcastIpExt>::BroadcastMarker: Unpin,
<<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::LocalIdentifier: Unpin,
<<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier: Unpin,
<WireI as Ip>::Addr: Unpin,
SocketI: Unpin,
<SocketI as Ip>::Addr: Unpin,
impl<WireI, SocketI, D, S> UnwindSafe for ConnState<WireI, SocketI, D, S>where
<SocketI as DualStackIpExt>::OtherVersion: Sized,
<WireI as DualStackIpExt>::OtherVersion: Sized,
<S as DatagramSocketSpec>::ConnStateExtra: UnwindSafe,
<S as DatagramSocketSpec>::OtherStackIpOptions<SocketI, D>: UnwindSafe,
<WireI as IpProtoExt>::Proto: UnwindSafe,
D: UnwindSafe,
<SocketI as BroadcastIpExt>::BroadcastMarker: UnwindSafe,
<<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::LocalIdentifier: UnwindSafe,
<<S as DatagramSocketSpec>::AddrSpec as SocketMapAddrSpec>::RemoteIdentifier: UnwindSafe,
<WireI as Ip>::Addr: UnwindSafe,
SocketI: UnwindSafe,
<SocketI 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