Struct netstack3_core::CoreApi

source ·
pub struct CoreApi<'a, BP>(/* private fields */)
where
    BP: ContextProvider,
    BP::Context: BindingsTypes;
Expand description

The single entry point for function calls into netstack3 core.

Implementations§

source§

impl<'a, BP> CoreApi<'a, BP>
where BP: ContextProvider, BP::Context: BindingsTypes,

source

pub fn udp<I: Ip>( self ) -> UdpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the UDP API for IP version I.

source

pub fn icmp_echo<I: Ip>( self ) -> IcmpEchoSocketApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the ICMP socket API for IP version I.

source

pub fn tcp<I: Ip>( self ) -> TcpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the TCP API for IP version I.

source

pub fn device_socket( self ) -> DeviceSocketApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the device socket API.

source

pub fn filter( self ) -> FilterApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the filtering API.

source

pub fn routes<I: Ip>( self ) -> RoutesApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the routes API for IP version I.

source

pub fn routes_any( self ) -> RoutesAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the routes API for IP version I.

source

pub fn neighbor<I: Ip, D>( self ) -> NeighborApi<I, D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the neighbor API for IP version I and device D.

source

pub fn device<D>( self ) -> DeviceApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the device API for device type D.

source

pub fn device_any( self ) -> DeviceAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the device API for all device types.

source

pub fn device_ip<I: Ip>( self ) -> DeviceIpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the device IP API for IP version `I``.

source

pub fn device_ip_any( self ) -> DeviceIpAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the device IP API for all IP versions.

source

pub fn transmit_queue<D>( self ) -> TransmitQueueApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the transmit queue API for device type D.

source

pub fn receive_queue<D>( self ) -> ReceiveQueueApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the receive queue API for device type D.

source

pub fn counters( self ) -> CountersApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>

Gets access to the counters API.

source

pub fn handle_timer(&mut self, timer: TimerId<BP::Context>)
where BP::Context: BindingsContext,

Handles a timer.

Auto Trait Implementations§

§

impl<'a, BP> Freeze for CoreApi<'a, BP>
where <BP as ContextProvider>::Context: TimerBindingsTypes<DispatchId = TimerId<<BP as ContextProvider>::Context>> + UdpBindingsTypes + Sized + IcmpBindingsTypes + IcmpEchoBindingsTypes + FilterBindingsTypes + TcpBindingsTypes + DeviceLayerTypes + ReferenceNotifiers + LinkResolutionContext<EthernetLinkDevice> + DeviceSocketTypes + DeviceLayerStateTypes + InstantContext + InstantBindingsTypes + 'static, BP: Freeze,

§

impl<'a, BP> RefUnwindSafe for CoreApi<'a, BP>
where <BP as ContextProvider>::Context: TimerBindingsTypes<DispatchId = TimerId<<BP as ContextProvider>::Context>> + UdpBindingsTypes + Sized + IcmpBindingsTypes + IcmpEchoBindingsTypes + FilterBindingsTypes + TcpBindingsTypes + DeviceLayerTypes + ReferenceNotifiers + LinkResolutionContext<EthernetLinkDevice> + DeviceSocketTypes + DeviceLayerStateTypes + InstantContext + InstantBindingsTypes + 'static, BP: RefUnwindSafe, <<BP as ContextProvider>::Context as InstantBindingsTypes>::Instant: RefUnwindSafe,

§

impl<'a, BP> Send for CoreApi<'a, BP>
where <BP as ContextProvider>::Context: TimerBindingsTypes<DispatchId = TimerId<<BP as ContextProvider>::Context>> + UdpBindingsTypes + Sized + IcmpBindingsTypes + IcmpEchoBindingsTypes + FilterBindingsTypes + TcpBindingsTypes + DeviceLayerTypes + ReferenceNotifiers + LinkResolutionContext<EthernetLinkDevice> + DeviceSocketTypes + DeviceLayerStateTypes + InstantContext + InstantBindingsTypes + 'static, BP: Send, <<BP as ContextProvider>::Context as FilterBindingsTypes>::DeviceClass: Sync + Send,

§

impl<'a, BP> Sync for CoreApi<'a, BP>
where <BP as ContextProvider>::Context: TimerBindingsTypes<DispatchId = TimerId<<BP as ContextProvider>::Context>> + UdpBindingsTypes + Sized + IcmpBindingsTypes + IcmpEchoBindingsTypes + FilterBindingsTypes + TcpBindingsTypes + DeviceLayerTypes + ReferenceNotifiers + LinkResolutionContext<EthernetLinkDevice> + DeviceSocketTypes + DeviceLayerStateTypes + InstantContext + InstantBindingsTypes + 'static, BP: Sync, <<BP as ContextProvider>::Context as FilterBindingsTypes>::DeviceClass: Sync + Send,

§

impl<'a, BP> Unpin for CoreApi<'a, BP>
where <BP as ContextProvider>::Context: TimerBindingsTypes<DispatchId = TimerId<<BP as ContextProvider>::Context>> + UdpBindingsTypes + Sized + IcmpBindingsTypes + IcmpEchoBindingsTypes + FilterBindingsTypes + TcpBindingsTypes + DeviceLayerTypes + ReferenceNotifiers + LinkResolutionContext<EthernetLinkDevice> + DeviceSocketTypes + DeviceLayerStateTypes + InstantContext + InstantBindingsTypes + 'static, BP: Unpin,

§

impl<'a, BP> UnwindSafe for CoreApi<'a, BP>
where <BP as ContextProvider>::Context: TimerBindingsTypes<DispatchId = TimerId<<BP as ContextProvider>::Context>> + UdpBindingsTypes + Sized + IcmpBindingsTypes + IcmpEchoBindingsTypes + FilterBindingsTypes + TcpBindingsTypes + DeviceLayerTypes + ReferenceNotifiers + LinkResolutionContext<EthernetLinkDevice> + DeviceSocketTypes + DeviceLayerStateTypes + InstantContext + InstantBindingsTypes + 'static, BP: UnwindSafe, <<BP as ContextProvider>::Context as InstantBindingsTypes>::Instant: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<Id, CC, BC> TimerHandler<BC, Id> for CC
where Id: HandleableTimer<CC, BC>,

source§

fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)

Handle a timer firing.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<B, A> LockBefore<B> for A
where B: LockAfter<A>,