Skip to main content

ByteSize

Trait ByteSize 

Source
pub trait ByteSize {
    // Required method
    fn byte_size(&self) -> usize;
}
Expand description

Opt-in trait for items that contribute a measurable byte size to a batch. Required when BatchPolicy::max_bytes is set.

Required Methods§

Source

fn byte_size(&self) -> usize

Number of bytes this item contributes to the batch.

Implementations on Foreign Types§

Source§

impl ByteSize for &str

Source§

impl ByteSize for &[u8]

Source§

impl ByteSize for String

Source§

impl ByteSize for Vec<u8>

Implementors§