[][src]Struct geom::Distance

pub struct Distance(f64);

In meters. Can be negative.

Implementations

impl Distance[src]

pub const ZERO: Distance[src]

pub fn meters(value: f64) -> Distance[src]

pub const fn const_meters(value: f64) -> Distance[src]

pub fn inches(value: f64) -> Distance[src]

pub fn miles(value: f64) -> Distance[src]

pub fn centimeters(value: usize) -> Distance[src]

pub fn abs(self) -> Distance[src]

pub fn sqrt(self) -> Distance[src]

pub fn inner_meters(self) -> f64[src]

pub fn describe_rounded(self) -> String[src]

pub fn max(self, other: Distance) -> Distance[src]

pub fn min(self, other: Distance) -> Distance[src]

Trait Implementations

impl Add<Distance> for Distance[src]

type Output = Distance

The resulting type after applying the + operator.

impl AddAssign<Distance> for Distance[src]

impl Clone for Distance[src]

impl Copy for Distance[src]

impl Debug for Distance[src]

impl Default for Distance[src]

impl<'de> Deserialize<'de> for Distance[src]

impl Display for Distance[src]

impl Div<Distance> for Distance[src]

type Output = f64

The resulting type after applying the / operator.

impl Div<Speed> for Distance[src]

type Output = Duration

The resulting type after applying the / operator.

impl Div<f64> for Distance[src]

type Output = Distance

The resulting type after applying the / operator.

impl Eq for Distance[src]

impl Mul<Distance> for f64[src]

type Output = Distance

The resulting type after applying the * operator.

impl Mul<f64> for Distance[src]

type Output = Distance

The resulting type after applying the * operator.

impl Neg for Distance[src]

type Output = Distance

The resulting type after applying the - operator.

impl Ord for Distance[src]

impl PartialEq<Distance> for Distance[src]

impl PartialOrd<Distance> for Distance[src]

impl Serialize for Distance[src]

impl StructuralPartialEq for Distance[src]

impl Sub<Distance> for Distance[src]

type Output = Distance

The resulting type after applying the - operator.

impl SubAssign<Distance> for Distance[src]

impl Sum<Distance> for Distance[src]

Auto Trait Implementations

impl RefUnwindSafe for Distance

impl Send for Distance

impl Sync for Distance

impl Unpin for Distance

impl UnwindSafe for Distance

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.