Skip to main content

NestablePacketBuilder

Trait NestablePacketBuilder 

Source
pub trait NestablePacketBuilder: Sized {
    // Required method
    fn constraints(&self) -> PacketConstraints;

    // Provided method
    fn wrap_body<B>(self, body: B) -> Nested<B, Self> { ... }
}

Required Methods§

Source

fn constraints(&self) -> PacketConstraints

Gets the constraints for this PacketBuilder.

Provided Methods§

Source

fn wrap_body<B>(self, body: B) -> Nested<B, Self>

Wraps given packet body in this packet.

Consumes the PacketBuilder and the body. If the body implements Serializer then the result implement Serializer as well.

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 NestablePacketBuilder for Infallible

Source§

impl NestablePacketBuilder for ()

Source§

impl<'a, B: NestablePacketBuilder> NestablePacketBuilder for &'a B

Source§

impl<'a, B: NestablePacketBuilder> NestablePacketBuilder for &'a mut B

Implementors§