# assert.rs - source
Source of the Rust file `src/assert.rs`.
Keywords: rust, rustlang, rust-lang

    1
    2
    3
    4
    5
    6
    7
    8
    9

    struct AssertInRange<const VALUE: usize, const MIN: usize, const MAX: usize>;

    impl<const VALUE: usize, const MIN: usize, const MAX: usize> AssertInRange<VALUE, MIN, MAX> {
    	const OK: () = assert!(MIN <= VALUE && VALUE <= MAX);
    }

    pub fn assert_in_range<const VALUE: usize, const MIN: usize, const MAX: usize> () {
    	let () = AssertInRange::<VALUE, MIN, MAX>::OK;
    }