safe_arithmetic/
lib.rs

1#![warn(missing_docs)]
2
3pub mod cast;
4pub mod clamp;
5pub mod error;
6pub mod ops;
7pub mod round;
8
9pub use cast::{Cast, CastError};
10pub use clamp::{Clamp, ClampMin};
11pub use error::Error;
12pub use round::{Ceil, Floor, Round, RoundingMode};
13use std::fmt::{Debug, Display};
14
15pub trait Type: Sized + Display + Debug + Clone + PartialEq + Send + Sync + 'static {}
16
17impl<T> Type for T where T: num::Num + Debug + Display + Clone + PartialEq + Send + Sync + 'static {}