Skip to main content

BlockContainer

Trait BlockContainer 

Source
pub trait BlockContainer {
    type Data;
    type ShareableData;

    // Required method
    fn len(&self) -> usize;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

fn len(&self) -> usize

Returns the size of the container.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns whether the container is empty or not.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl BlockContainer for Vec<u8>

Source§

fn len(&self) -> usize

The number of bytes in the buffer.

Source§

type Data = Vec<u8>

Source§

type ShareableData = ()

Source§

impl BlockContainer for Vmo

Source§

impl BlockContainer for [u8]

Source§

impl<const N: usize> BlockContainer for [u8; N]

Source§

fn len(&self) -> usize

The number of bytes in the buffer.

Source§

type Data = [u8; N]

Source§

type ShareableData = ()

Implementors§