Trait Unit

Source
pub trait Unit: Copy + UnitPrivate {
    // Required method
    fn zero() -> Self;
}
Expand description

The generic unit type contained within Buffer slices.

This is a sealed trait. It’s only implemented for u8 and u32.

A Buffer with U = u8 is a Bytes buffer.

A Buffer with U = u32 is a Ump buffer.

Required Methods§

Source

fn zero() -> Self

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 Unit for u8

Source§

fn zero() -> Self

Source§

impl Unit for u32

Source§

fn zero() -> Self

Implementors§