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>
impl<'a, BP> CoreApi<'a, BP>
Sourcepub fn udp<I: Ip>(
self,
) -> UdpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
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
.
Sourcepub fn icmp_echo<I: Ip>(
self,
) -> IcmpEchoSocketApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
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
.
Sourcepub fn tcp<I: Ip>(
self,
) -> TcpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
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
.
Sourcepub fn raw_ip_socket<I: Ip>(
self,
) -> RawIpSocketApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn raw_ip_socket<I: Ip>( self, ) -> RawIpSocketApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the raw IP socket API.
Sourcepub fn device_socket(
self,
) -> DeviceSocketApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn device_socket( self, ) -> DeviceSocketApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the device socket API.
Sourcepub fn filter(
self,
) -> FilterApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn filter( self, ) -> FilterApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the filtering API.
Sourcepub fn routes<I: Ip>(
self,
) -> RoutesApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
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
.
Sourcepub fn routes_any(
self,
) -> RoutesAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn routes_any( self, ) -> RoutesAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the routes API for all IP versions.
Sourcepub fn multicast_forwarding<I: Ip>(
self,
) -> MulticastForwardingApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn multicast_forwarding<I: Ip>( self, ) -> MulticastForwardingApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the multicast forwarding API for IP version I
.
Sourcepub fn neighbor<I: Ip, D>(
self,
) -> NeighborApi<I, D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
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
.
Sourcepub fn device<D>(
self,
) -> DeviceApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
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
.
Sourcepub fn device_any(
self,
) -> DeviceAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
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.
Sourcepub fn device_ip<I: Ip>(
self,
) -> DeviceIpApi<I, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
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``.
Sourcepub fn device_ip_any(
self,
) -> DeviceIpAnyApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
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.
Sourcepub fn transmit_queue<D>(
self,
) -> TransmitQueueApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
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
.
Sourcepub fn receive_queue<D>(
self,
) -> ReceiveQueueApi<D, CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
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
.
Sourcepub fn counters(
self,
) -> CountersApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
pub fn counters( self, ) -> CountersApi<CtxPair<CoreCtx<'a, <BP as ContextProvider>::Context, Unlocked>, BP>>
Gets access to the counters API.
Sourcepub fn handle_timer(
&mut self,
dispatch: TimerId<BP::Context>,
timer: <BP::Context as TimerBindingsTypes>::UniqueTimerId,
)where
BP::Context: BindingsContext,
pub fn handle_timer(
&mut self,
dispatch: TimerId<BP::Context>,
timer: <BP::Context as TimerBindingsTypes>::UniqueTimerId,
)where
BP::Context: BindingsContext,
Handles a timer.
Auto Trait Implementations§
impl<'a, BP> Freeze for CoreApi<'a, BP>
impl<'a, BP> RefUnwindSafe for CoreApi<'a, BP>where
<BP as ContextProvider>::Context: Sized,
BP: RefUnwindSafe,
<<BP as ContextProvider>::Context as InstantBindingsTypes>::Instant: RefUnwindSafe,
impl<'a, BP> Send for CoreApi<'a, BP>where
<BP as ContextProvider>::Context: Sized,
BP: Send,
<<BP as ContextProvider>::Context as InstantBindingsTypes>::AtomicInstant: Send + Sync,
<<BP as ContextProvider>::Context as FilterBindingsTypes>::DeviceClass: Sync + Send,
impl<'a, BP> Sync for CoreApi<'a, BP>where
<BP as ContextProvider>::Context: Sized,
BP: Sync,
<<BP as ContextProvider>::Context as InstantBindingsTypes>::AtomicInstant: Send + Sync,
<<BP as ContextProvider>::Context as FilterBindingsTypes>::DeviceClass: Sync + Send,
impl<'a, BP> Unpin for CoreApi<'a, BP>
impl<'a, BP> UnwindSafe for CoreApi<'a, BP>where
<BP as ContextProvider>::Context: Sized,
BP: UnwindSafe,
<<BP as ContextProvider>::Context as InstantBindingsTypes>::Instant: 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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more