partial_const

This library provides a way to handle constant and non-constant values in a unified way. This library takes both flexibilities to take dynamic values and (partial) parameter checking by the compiler.

Example

```rust fn maybeone>(i: T) -> bool where T: partialconst::Equals> { // where T: partial_const::Equals> { <- Alternative i.value() == 1i32 }

assert!(maybeone(partialconst::ConstI32::<1>::new())); assert!(maybeone::>(partialconst::ConstI32::new())); assert!(maybeone::(1)); assert!(!maybeone::(2)); // assert!(maybeone(partialconst::ConstI32::<2>::new())); <- Compile Error ```

License: MIT