pub struct Longitude(/* private fields */);Expand description
Geographic longitude in degrees, -180.0..=180.0.
Implementations§
Source§impl Longitude
impl Longitude
Sourcepub fn new(value: f64) -> Result<Longitude, OutOfRange>
pub fn new(value: f64) -> Result<Longitude, OutOfRange>
Constructs a new value, validating the range.
§Errors
Returns OutOfRange if value is NaN or outside the
valid range.
Sourcepub const fn new_unchecked(value: f64) -> Longitude
pub const fn new_unchecked(value: f64) -> Longitude
Constructs without validation.
The caller must ensure value lies within the valid range.
Trait Implementations§
impl Copy for Longitude
Source§impl PartialOrd for Longitude
impl PartialOrd for Longitude
impl StructuralPartialEq for Longitude
Auto Trait Implementations§
impl Freeze for Longitude
impl RefUnwindSafe for Longitude
impl Send for Longitude
impl Sync for Longitude
impl Unpin for Longitude
impl UnsafeUnpin for Longitude
impl UnwindSafe for Longitude
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