pub struct GrainSize(/* private fields */);Implementations§
Source§impl GrainSize
impl GrainSize
Sourcepub fn new(millimeters: f64) -> Result<Self, GrainSizeError>
pub fn new(millimeters: f64) -> Result<Self, GrainSizeError>
Creates a non-negative grain size in millimeters.
§Errors
Returns GrainSizeError::NonFinite when the value is not finite.
Returns GrainSizeError::Negative when the value is negative.
pub const fn millimeters(self) -> f64
Trait Implementations§
Source§impl PartialOrd for GrainSize
impl PartialOrd for GrainSize
impl Copy for GrainSize
impl StructuralPartialEq for GrainSize
Auto Trait Implementations§
impl Freeze for GrainSize
impl RefUnwindSafe for GrainSize
impl Send for GrainSize
impl Sync for GrainSize
impl Unpin for GrainSize
impl UnsafeUnpin for GrainSize
impl UnwindSafe for GrainSize
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more