StaticCap

Trait StaticCap 

Source
pub trait StaticCap {
    type Cap: Capacity + StaticCap;

    const CAP: Self::Cap;
}
Expand description

A type with an associated static capacity constraint.

§Note on Compatibility

Success on a compatibility check means that the iterator’s declared bounds (from Iterator::size_hint) do not contradict the capacity constraints. See Capacity and Capacity for details.

Required Associated Constants§

Source

const CAP: Self::Cap

The static capacity constraint.

Required Associated Types§

Source

type Cap: Capacity + StaticCap

The type of the capacity constraint value.

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 StaticCap for RangeFull

Source§

const CAP: UnboundedCap = UnboundedCap

Source§

type Cap = UnboundedCap

Source§

impl<T, const N: usize> StaticCap for ArrayVec<T, N>

Source§

const CAP: Self::Cap

Source§

type Cap = StaticMaxCap<N>

Source§

impl<const N: usize, T> StaticCap for [T; N]

Implementors§

Source§

impl StaticCap for UnboundedCap

Source§

const CAP: Self::Cap = Self

Source§

type Cap = UnboundedCap

Source§

impl<const MAX: usize> StaticCap for StaticMaxCap<MAX>

Source§

const CAP: Self::Cap = Self

Source§

type Cap = StaticMaxCap<MAX>

Source§

impl<const MIN: usize> StaticCap for StaticMinCap<MIN>

Source§

const CAP: Self::Cap = Self

Source§

type Cap = StaticMinCap<MIN>

Source§

impl<const MIN: usize, const MAX: usize> StaticCap for StaticMinMaxCap<MIN, MAX>

Source§

const CAP: Self::Cap

Source§

type Cap = StaticMinMaxCap<MIN, MAX>

Source§

impl<const SIZE: usize> StaticCap for StaticExactCap<SIZE>

Source§

const CAP: Self::Cap = Self

Source§

type Cap = StaticExactCap<SIZE>