Skip to content

noriapi/boundnum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workflow Status

boundnum

This crate provides a type boundary and a numeric type bounded by it.

Example

use boundnum::{expr::*, typenum::consts::*, Bounded, Boundable};

fn main() {
    let less4 = Bounded::<u8, Le<Arg, U4>>::new::<U1>();

    let mul_of_two: Bounded<u8, Eq<U0, Rem<Arg, U2>>> =
        (*less4 + 3).bound().unwrap_or(Bounded::new::<U0>());
}

About

bounded number types.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages