Add a prelude
This prelude contains the sealed public types as well as the conversions traits.
This commit is contained in:
parent
dad1cb298c
commit
a94621e1d5
16
src/lib.rs
16
src/lib.rs
|
@ -224,6 +224,22 @@ use {
|
|||
},
|
||||
};
|
||||
|
||||
/// A "prelude" for users of the *fixed* crate.
|
||||
///
|
||||
/// This prelude is similar to the standard library's prelude in that you'll
|
||||
/// almost always want to import its entire contents, but unlike the standard
|
||||
/// library's prelude you'll have to do so manually:
|
||||
///
|
||||
/// ```
|
||||
/// ##[allow(unused_imports)]
|
||||
/// use fixed::prelude::*;
|
||||
/// ```
|
||||
///
|
||||
/// The prelude may grow over time as additional items see ubiquitous use.
|
||||
pub mod prelude {
|
||||
pub use crate::traits::{FromFixed, ToFixed};
|
||||
}
|
||||
|
||||
#[macro_use]
|
||||
mod macros_from_to;
|
||||
#[macro_use]
|
||||
|
|
Loading…
Reference in New Issue