pub struct Length(pub f64);Expand description
A physical length in PDF points (1/72 inch), the length.ml unit.
Add, Sub, Neg and Mul<f64> stay hand-written: newer-type’s generic
ops markers forward the inner type’s Output verbatim, so
newer_type_std::ops::Add on an f64 newtype yields Output = f64, not
Output = Self, and the macro has no syntax for pinning an associated type
(newer-type-macro’s Implementor::parse rejects AssocType arguments).
Using it would silently change Length + Length to f64. AddAssign has
no Output to lose, so it converts cleanly.
Tuple Fields§
§0: f64Implementations§
Trait Implementations§
Source§impl AddAssign for Length
impl AddAssign for Length
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreimpl AddAssign for Length
impl Copy for Length
Source§impl PartialOrd for Length
impl PartialOrd for Length
impl StructuralPartialEq for Length
Auto Trait Implementations§
impl Freeze for Length
impl RefUnwindSafe for Length
impl Send for Length
impl Sync for Length
impl Unpin for Length
impl UnsafeUnpin for Length
impl UnwindSafe for Length
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