Crates.io | signrel |
lib.rs | signrel |
version | 2.0.0 |
source | src |
created_at | 2018-10-10 18:02:08.603114 |
updated_at | 2020-09-07 20:40:31.852351 |
description | Trait expressing relationship between integers of different signedness |
homepage | |
repository | https://github.com/enarx/signrel |
max_upload_size | |
id | 89107 |
size | 17,318 |
This crate provides the SignRel
trait which maps relationships between
integers that only differ by signedness. For example, both a
and b
in
this example have the type usize
:
use signrel::SignRel;
let a: <isize as SignRel>::Unsigned = 17;
let b: <usize as SignRel>::Unsigned = 17;
assert_eq!(17usize, a);
assert_eq!(17usize, b);
License: Apache-2.0