Skip to main content

Niche

Trait Niche 

Source
pub trait Niche {
    type NeedsTag: Bit;
    type N: ArrayLength;
    type Next;

    // Required method
    fn niche() -> GenericArray<u8, Self::N>;
}
Expand description

True or fake (placeholder) niche.

Required Associated Types§

Source

type NeedsTag: Bit

Whether this is a fake niche (true niches, i.e. those which don’t need a tag, don’t represent a value).

Source

type N: ArrayLength

Length in bytes.

Source

type Next

What we’re left with once we occupy Self::niche.

Required Methods§

Source

fn niche() -> GenericArray<u8, Self::N>

Get the niche bytes.

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.

Implementors§