Skip to content

Trait definitions for Rust types implementing checked_*, overflow_*, saturating_* and wrapping_* arithmetic operations

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

U007D/arith_traits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arith_traits

Traits unifying types based on various supported arithmetic operations.

If you've ever wanted your generic function to accept any value that supports, for example, checked arithmetic, you have discovered that std does not define a trait that all checked types implement.

This crate remedies that. It was developed to simplify the implementation of the arranged crate and is leveraged by the companion arith_wrappers crate. It may also be of value to other crates performing generic arithmetic.

NOTE: Currently requires nightly compiler.

License

Licensed under either:

  • MIT license (see LICENSE-MIT file)
  • Apache License, Version 2.0 (see LICENSE-APACHE file) at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

About

Trait definitions for Rust types implementing checked_*, overflow_*, saturating_* and wrapping_* arithmetic operations

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages