Trait radiation::Limit

source ·
pub trait Limit {
    type Inner: Limit;
    type Next: Limit;

    const LOWER: usize;
    const UPPER: usize;
    const DESCRIPTION: &'static str;

    // Provided method
    fn check(size: usize) -> Result<usize, LimitError> { ... }
}

Required Associated Types§

Required Associated Constants§

Provided Methods§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Limit for ()

§

type Inner = ()

§

type Next = ()

source§

const LOWER: usize = 0usize

source§

const UPPER: usize = 18_446_744_073_709_551_615usize

source§

const DESCRIPTION: &'static str = "unlimited"

source§

fn check(size: usize) -> Result<usize, LimitError>

Implementors§

source§

impl<L, N, const LOWER: usize, const UPPER: usize> Limit for LimitDescriptor<L, N, LOWER, UPPER>
where L: Limit, N: Limit,

§

type Inner = L

§

type Next = N

source§

const LOWER: usize = LOWER

source§

const UPPER: usize = UPPER

source§

const DESCRIPTION: &'static str = "wait for issue 44580 (adt_const_params)"