Skip to main content

MaybeSegmentableTransportSerializer

Trait MaybeSegmentableTransportSerializer 

Source
pub trait MaybeSegmentableTransportSerializer {
    type Builder<'a>: SegmentableTransportBuilder
       where Self: 'a;
    type Payload<'a>: Payload + InnerPacketBuilder + Copy
       where Self: 'a;

    // Required method
    fn try_as_segmentable(
        &self,
    ) -> Result<(Self::Builder<'_>, Self::Payload<'_>), GsoError>;
}
Expand description

A transport-layer packet::Serializer that may carry a payload splittable in software.

Required Associated Types§

Source

type Builder<'a>: SegmentableTransportBuilder where Self: 'a

The transport header stamped onto every segment.

Source

type Payload<'a>: Payload + InnerPacketBuilder + Copy where Self: 'a

The transport payload split across the segments.

Required Methods§

Source

fn try_as_segmentable( &self, ) -> Result<(Self::Builder<'_>, Self::Payload<'_>), GsoError>

Attempts to extract the transport header template and the payload to split, returning an error if this serializer can’t be segmented.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, I: FilterIpExt> MaybeSegmentableTransportSerializer for DynTransportSerializer<'a, I>

Source§

type Builder<'x> = ! where Self: 'x

Source§

type Payload<'x> = &'x [u8] where Self: 'x

Source§

fn try_as_segmentable(&self) -> Result<(!, &[u8]), GsoError>

Source§

impl<A, P, B, O> MaybeSegmentableTransportSerializer for Nested<InnerSerializer<P, B>, TcpSegmentBuilderWithOptions<A, O>>

Source§

type Builder<'a> = &'a TcpSegmentBuilderWithOptions<A, O> where Self: 'a

Source§

type Payload<'a> = P where Self: 'a

Source§

fn try_as_segmentable( &self, ) -> Result<(&TcpSegmentBuilderWithOptions<A, O>, P), GsoError>

Source§

impl<I: IpExt, B: ParseBuffer> MaybeSegmentableTransportSerializer for RawIpBody<I, B>

Source§

type Builder<'x> = ! where Self: 'x

Source§

type Payload<'x> = &'x [u8] where Self: 'x

Source§

fn try_as_segmentable(&self) -> Result<(!, &[u8]), GsoError>

Source§

impl<P, B> MaybeSegmentableTransportSerializer for InnerSerializer<P, B>

Source§

type Builder<'x> = ! where Self: 'x

Source§

type Payload<'x> = &'x [u8] where Self: 'x

Source§

fn try_as_segmentable(&self) -> Result<(!, &[u8]), GsoError>

Source§

impl<S, A: IpAddress> MaybeSegmentableTransportSerializer for Nested<S, UdpPacketBuilder<A>>

Source§

type Builder<'x> = ! where Self: 'x

Source§

type Payload<'x> = &'x [u8] where Self: 'x

Source§

fn try_as_segmentable(&self) -> Result<(!, &[u8]), GsoError>

Source§

impl<S, I: IcmpIpExt, M: IcmpMessage<I>> MaybeSegmentableTransportSerializer for Nested<S, IcmpPacketBuilder<I, M>>

Source§

type Builder<'x> = ! where Self: 'x

Source§

type Payload<'x> = &'x [u8] where Self: 'x

Source§

fn try_as_segmentable(&self) -> Result<(!, &[u8]), GsoError>

Source§

impl<S> MaybeSegmentableTransportSerializer for Nested<S, ()>

Source§

type Builder<'x> = ! where Self: 'x

Source§

type Payload<'x> = &'x [u8] where Self: 'x

Source§

fn try_as_segmentable(&self) -> Result<(!, &[u8]), GsoError>

Implementors§