octseq::builder

Trait FromBuilder

Source
pub trait FromBuilder: AsRef<[u8]> + Sized {
    type Builder: OctetsBuilder + FreezeBuilder<Octets = Self>;

    // Required method
    fn from_builder(builder: Self::Builder) -> Self;
}
Expand description

An octets type that can be created from an octets builder.

Required Associated Types§

Source

type Builder: OctetsBuilder + FreezeBuilder<Octets = Self>

The type of builder this octets type can be created from.

Required Methods§

Source

fn from_builder(builder: Self::Builder) -> Self

Creates an octets value from an octets builder.

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 FromBuilder for Bytes

Source§

type Builder = BytesMut

Source§

fn from_builder(builder: Self::Builder) -> Self

Source§

impl FromBuilder for Vec<u8>

Source§

type Builder = Vec<u8>

Source§

fn from_builder(builder: Self::Builder) -> Self

Source§

impl<'a> FromBuilder for Cow<'a, [u8]>

Source§

type Builder = Cow<'a, [u8]>

Source§

fn from_builder(builder: Self::Builder) -> Self

Source§

impl<A: Array<Item = u8>> FromBuilder for SmallVec<A>

Source§

type Builder = SmallVec<A>

Source§

fn from_builder(builder: Self::Builder) -> Self

Implementors§

Source§

impl<const N: usize> FromBuilder for Array<N>