netstack3_tcp

Trait TcpDemuxContext

Source
pub trait TcpDemuxContext<I: DualStackIpExt, D: WeakDeviceIdentifier, BT: TcpBindingsTypes>: TcpCoreTimerContext<I, D, BT> {
    type IpTransportCtx<'a>: TransportIpContext<I, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I, BT> + TcpCoreTimerContext<I, D, BT> + CounterContext<TcpCounters<I>> + CounterContext<TcpCounters<I::OtherVersion>>;

    // Required methods
    fn with_demux<O, F: FnOnce(&DemuxState<I, D, BT>) -> O>(
        &mut self,
        cb: F,
    ) -> O;
    fn with_demux_mut<O, F: FnOnce(&mut DemuxState<I, D, BT>) -> O>(
        &mut self,
        cb: F,
    ) -> O;
}
Expand description

The core execution context abstracting demux state access for TCP.

Required Associated Types§

Source

type IpTransportCtx<'a>: TransportIpContext<I, BT, DeviceId = D::Strong, WeakDeviceId = D> + DeviceIpSocketHandler<I, BT> + TcpCoreTimerContext<I, D, BT> + CounterContext<TcpCounters<I>> + CounterContext<TcpCounters<I::OtherVersion>>

The inner IP transport context.

Required Methods§

Source

fn with_demux<O, F: FnOnce(&DemuxState<I, D, BT>) -> O>(&mut self, cb: F) -> O

Calls f with non-mutable access to the demux state.

Source

fn with_demux_mut<O, F: FnOnce(&mut DemuxState<I, D, BT>) -> O>( &mut self, cb: F, ) -> O

Calls f with mutable access to the demux state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<I: DualStackIpExt, D: WeakDeviceIdentifier, BT: TcpBindingsTypes, P: TcpDemuxContext<I, D, BT>> TcpDemuxContext<I, D, BT> for UninstantiableWrapper<P>

Source§

type IpTransportCtx<'a> = <P as TcpDemuxContext<I, D, BT>>::IpTransportCtx<'a>

Source§

fn with_demux<O, F: FnOnce(&DemuxState<I, D, BT>) -> O>(&mut self, _cb: F) -> O

Source§

fn with_demux_mut<O, F: FnOnce(&mut DemuxState<I, D, BT>) -> O>( &mut self, _cb: F, ) -> O

Implementors§