Trait octseq::builder::EmptyBuilder

source ·
pub trait EmptyBuilder {
    // Required methods
    fn empty() -> Self;
    fn with_capacity(capacity: usize) -> Self;
}
Expand description

An octets builder that can be newly created empty.

Required Methods§

source

fn empty() -> Self

Creates a new empty octets builder with a default size.

source

fn with_capacity(capacity: usize) -> Self

Creates a new empty octets builder with a suggested initial size.

The builder may or may not use the size provided by capacity as the initial size of the buffer. It may very well be possibly that the builder is never able to grow to this capacity at all. Therefore, even if you create a builder for your data size via this function, appending may still fail.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl EmptyBuilder for BytesMut

source§

fn empty() -> Self

source§

fn with_capacity(capacity: usize) -> Self

source§

impl EmptyBuilder for Vec<u8>

source§

fn empty() -> Self

source§

fn with_capacity(capacity: usize) -> Self

source§

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

source§

fn empty() -> Self

source§

fn with_capacity(capacity: usize) -> Self

Implementors§

source§

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