negative_isize

Macro negative_isize 

Source
macro_rules! negative_isize {
    ($e:expr $(,)?) => { ... };
}
Expand description

Creates a NegativeIsize checked at compile time.

This macro takes a single argument that must be a negative isize. Positive values will cause a compile error.

use sign_bound::{NegativeIsize, negative_isize};

let val: NegativeIsize = negative_isize!(-123);