pub struct StackState<BT: BindingsTypes> { /* private fields */ }
Expand description
The state associated with the network stack.
Implementations§
Source§impl<BT: BindingsTypes> StackState<BT>
impl<BT: BindingsTypes> StackState<BT>
Sourcepub fn api<'a, BP: ContextProvider<Context = BT>>(
&'a self,
bindings_ctx: BP,
) -> CoreApi<'a, BP>
pub fn api<'a, BP: ContextProvider<Context = BT>>( &'a self, bindings_ctx: BP, ) -> CoreApi<'a, BP>
Gets access to the API from a mutable reference to the bindings context.
Source§impl<BC: BindingsContext> StackState<BC>
impl<BC: BindingsContext> StackState<BC>
Trait Implementations§
Source§impl<BC: BindingsContext> BuildableCoreContext<BC> for StackState<BC>
impl<BC: BindingsContext> BuildableCoreContext<BC> for StackState<BC>
Source§type Builder = StackStateBuilder
type Builder = StackStateBuilder
The builder type that can build this core context.
Source§fn build(bindings_ctx: &mut BC, builder: StackStateBuilder) -> Self
fn build(bindings_ctx: &mut BC, builder: StackStateBuilder) -> Self
Consumes this builder and returns the context.
Source§impl<BT: BindingsTypes> CoreTimerContext<IpLayerTimerId, BT> for StackState<BT>
impl<BT: BindingsTypes> CoreTimerContext<IpLayerTimerId, BT> for StackState<BT>
Source§fn convert_timer(timer: IpLayerTimerId) -> TimerId<BT>
fn convert_timer(timer: IpLayerTimerId) -> TimerId<BT>
Converts an inner timer to the bindings timer type.
Source§fn new_timer(
bindings_ctx: &mut BT,
dispatch_id: T,
) -> <BT as TimerBindingsTypes>::Timerwhere
BT: TimerContext,
fn new_timer(
bindings_ctx: &mut BT,
dispatch_id: T,
) -> <BT as TimerBindingsTypes>::Timerwhere
BT: TimerContext,
A helper function to create a new timer with the provided dispatch id.
Source§impl<BT: BindingsTypes> DelegatedOrderedLockAccess<AllSockets<WeakDeviceId<BT>, BT>> for StackState<BT>
impl<BT: BindingsTypes> DelegatedOrderedLockAccess<AllSockets<WeakDeviceId<BT>, BT>> for StackState<BT>
Source§type Inner = Sockets<WeakDeviceId<BT>, BT>
type Inner = Sockets<WeakDeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<BT: BindingsTypes> DelegatedOrderedLockAccess<AnyDeviceSockets<WeakDeviceId<BT>, BT>> for StackState<BT>
impl<BT: BindingsTypes> DelegatedOrderedLockAccess<AnyDeviceSockets<WeakDeviceId<BT>, BT>> for StackState<BT>
Source§type Inner = Sockets<WeakDeviceId<BT>, BT>
type Inner = Sockets<WeakDeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: IpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<BoundSockets<I, WeakDeviceId<BT>, BT>> for StackState<BT>
impl<I: IpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<BoundSockets<I, WeakDeviceId<BT>, BT>> for StackState<BT>
Source§type Inner = Sockets<I, WeakDeviceId<BT>, BT>
type Inner = Sockets<I, WeakDeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: DualStackIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<BoundSockets<I, WeakDeviceId<BT>, BT>> for StackState<BT>
impl<I: DualStackIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<BoundSockets<I, WeakDeviceId<BT>, BT>> for StackState<BT>
Source§type Inner = IcmpSockets<I, WeakDeviceId<BT>, BT>
type Inner = IcmpSockets<I, WeakDeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: DualStackIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<DatagramSocketSet<I, WeakDeviceId<BT>, Icmp<BT>>> for StackState<BT>
impl<I: DualStackIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<DatagramSocketSet<I, WeakDeviceId<BT>, Icmp<BT>>> for StackState<BT>
Source§type Inner = IcmpSockets<I, WeakDeviceId<BT>, BT>
type Inner = IcmpSockets<I, WeakDeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: IpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<DatagramSocketSet<I, WeakDeviceId<BT>, Udp<BT>>> for StackState<BT>
impl<I: IpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<DatagramSocketSet<I, WeakDeviceId<BT>, Udp<BT>>> for StackState<BT>
Source§type Inner = Sockets<I, WeakDeviceId<BT>, BT>
type Inner = Sockets<I, WeakDeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: DualStackIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<DemuxState<I, WeakDeviceId<BT>, BT>> for StackState<BT>
impl<I: DualStackIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<DemuxState<I, WeakDeviceId<BT>, BT>> for StackState<BT>
Source§type Inner = Sockets<I, WeakDeviceId<BT>, BT>
type Inner = Sockets<I, WeakDeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<BT: BindingsTypes> DelegatedOrderedLockAccess<Devices<BT>> for StackState<BT>
impl<BT: BindingsTypes> DelegatedOrderedLockAccess<Devices<BT>> for StackState<BT>
Source§type Inner = DeviceLayerState<BT>
type Inner = DeviceLayerState<BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<HashMap<RoutingTableId<I, DeviceId<BT>>, Primary<RwLock<RoutingTable<I, DeviceId<BT>>>>>> for StackState<BT>
impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<HashMap<RoutingTableId<I, DeviceId<BT>>, Primary<RwLock<RoutingTable<I, DeviceId<BT>>>>>> for StackState<BT>
Source§type Inner = IpStateInner<I, DeviceId<BT>, BT>
type Inner = IpStateInner<I, DeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: DualStackIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<IpMarked<I, TokenBucket<<BT as InstantBindingsTypes>::Instant>>> for StackState<BT>
impl<I: DualStackIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<IpMarked<I, TokenBucket<<BT as InstantBindingsTypes>::Instant>>> for StackState<BT>
Source§impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<IpPacketFragmentCache<I, BT>> for StackState<BT>
impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<IpPacketFragmentCache<I, BT>> for StackState<BT>
Source§type Inner = IpStateInner<I, DeviceId<BT>, BT>
type Inner = IpStateInner<I, DeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<MulticastForwardingState<I, DeviceId<BT>, BT>> for StackState<BT>
impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<MulticastForwardingState<I, DeviceId<BT>, BT>> for StackState<BT>
Source§type Inner = IpStateInner<I, DeviceId<BT>, BT>
type Inner = IpStateInner<I, DeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<PmtuCache<I, BT>> for StackState<BT>
impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<PmtuCache<I, BT>> for StackState<BT>
Source§type Inner = IpStateInner<I, DeviceId<BT>, BT>
type Inner = IpStateInner<I, DeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<RawIpSocketMap<I, WeakDeviceId<BT>, BT>> for StackState<BT>
impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<RawIpSocketMap<I, WeakDeviceId<BT>, BT>> for StackState<BT>
Source§type Inner = IpStateInner<I, DeviceId<BT>, BT>
type Inner = IpStateInner<I, DeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<RulesTable<I, DeviceId<BT>>> for StackState<BT>
impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<RulesTable<I, DeviceId<BT>>> for StackState<BT>
Source§type Inner = IpStateInner<I, DeviceId<BT>, BT>
type Inner = IpStateInner<I, DeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<State<I, <I as IpAddressIdExt>::Weak<BT>, BT>> for StackState<BT>
impl<I: IpLayerIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<State<I, <I as IpAddressIdExt>::Weak<BT>, BT>> for StackState<BT>
Source§type Inner = IpStateInner<I, DeviceId<BT>, BT>
type Inner = IpStateInner<I, DeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Source§impl<I: DualStackIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<TcpSocketSet<I, WeakDeviceId<BT>, BT>> for StackState<BT>
impl<I: DualStackIpExt, BT: BindingsTypes> DelegatedOrderedLockAccess<TcpSocketSet<I, WeakDeviceId<BT>, BT>> for StackState<BT>
Source§type Inner = Sockets<I, WeakDeviceId<BT>, BT>
type Inner = Sockets<I, WeakDeviceId<BT>, BT>
The inner type acting as a proxy for ordered access to T.
Source§fn delegate_ordered_lock_access(&self) -> &Self::Inner
fn delegate_ordered_lock_access(&self) -> &Self::Inner
Returns the inner type.
Auto Trait Implementations§
impl<BT> !Freeze for StackState<BT>
impl<BT> RefUnwindSafe for StackState<BT>
impl<BT> Send for StackState<BT>where
<BT as InstantBindingsTypes>::AtomicInstant: Send,
<BT as FilterBindingsTypes>::DeviceClass: Sync + Send,
impl<BT> Sync for StackState<BT>where
<BT as InstantBindingsTypes>::AtomicInstant: Send + Sync,
<BT as FilterBindingsTypes>::DeviceClass: Sync + Send,
impl<BT> Unpin for StackState<BT>where
<BT as InstantBindingsTypes>::Instant: Unpin,
<BT as TimerBindingsTypes>::Timer: Unpin,
<BT as FilterBindingsTypes>::DeviceClass: Unpin,
impl<BT> UnwindSafe for StackState<BT>
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, O> OrderedLockAccess<T> for Owhere
O: DelegatedOrderedLockAccess<T>,
impl<T, O> OrderedLockAccess<T> for Owhere
O: DelegatedOrderedLockAccess<T>,
Source§type Lock = <<O as DelegatedOrderedLockAccess<T>>::Inner as OrderedLockAccess<T>>::Lock
type Lock = <<O as DelegatedOrderedLockAccess<T>>::Inner as OrderedLockAccess<T>>::Lock
The lock type that observes ordering. Read more
Source§fn ordered_lock_access(
&self,
) -> OrderedLockRef<'_, <O as OrderedLockAccess<T>>::Lock>
fn ordered_lock_access( &self, ) -> OrderedLockRef<'_, <O as OrderedLockAccess<T>>::Lock>
Returns a borrow to the order-aware lock. 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
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.