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§
Sourcefn with_capacity(capacity: usize) -> Self
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 possible 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.
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 EmptyBuilder for BytesMut
Available on crate feature bytes only.
impl EmptyBuilder for BytesMut
Available on crate feature
bytes only.Source§impl EmptyBuilder for Vec<u8>
Available on crate feature std only.
impl EmptyBuilder for Vec<u8>
Available on crate feature
std only.Source§impl<A: Array<Item = u8>> EmptyBuilder for SmallVec<A>
Available on crate feature smallvec only.
impl<A: Array<Item = u8>> EmptyBuilder for SmallVec<A>
Available on crate feature
smallvec only.