Struct osmgraphing::approximating::Approx
source · [−]pub struct Approx<T>(pub T);
Tuple Fields
0: T
Implementations
sourceimpl Approx<Coordinate>
impl Approx<Coordinate>
pub fn approx(&self) -> Coordinate
Trait Implementations
sourceimpl<T> Ord for Approx<&T> where
T: Copy + Ord,
Approx<T>: Ord,
impl<T> Ord for Approx<&T> where
T: Copy + Ord,
Approx<T>: Ord,
sourceimpl<T> Ord for Approx<Option<T>> where
T: Copy + Ord,
Approx<T>: Ord,
impl<T> Ord for Approx<Option<T>> where
T: Copy + Ord,
Approx<T>: Ord,
sourceimpl Ord for Approx<f64>
impl Ord for Approx<f64>
sourceimpl<T> PartialEq<Approx<&[T]>> for Approx<&[T]> where
T: PartialEq + Copy,
Approx<T>: PartialEq,
impl<T> PartialEq<Approx<&[T]>> for Approx<&[T]> where
T: PartialEq + Copy,
Approx<T>: PartialEq,
sourceimpl<T, A> PartialEq<Approx<&SmallVec<A>>> for Approx<&SmallVec<A>> where
T: PartialEq + Copy,
Approx<T>: PartialEq,
A: Array<Item = T>,
impl<T, A> PartialEq<Approx<&SmallVec<A>>> for Approx<&SmallVec<A>> where
T: PartialEq + Copy,
Approx<T>: PartialEq,
A: Array<Item = T>,
sourceimpl PartialEq<Approx<Coordinate>> for Approx<Coordinate>
impl PartialEq<Approx<Coordinate>> for Approx<Coordinate>
sourceimpl<T> PartialEq<Approx<Option<T>>> for Approx<Option<T>> where
T: Copy + PartialEq,
Approx<T>: PartialEq,
impl<T> PartialEq<Approx<Option<T>>> for Approx<Option<T>> where
T: Copy + PartialEq,
Approx<T>: PartialEq,
sourceimpl<T> PartialOrd<Approx<&[T]>> for Approx<&[T]> where
T: PartialOrd + Copy,
Approx<T>: PartialOrd,
impl<T> PartialOrd<Approx<&[T]>> for Approx<&[T]> where
T: PartialOrd + Copy,
Approx<T>: PartialOrd,
sourcefn partial_cmp(&self, other: &Approx<&[T]>) -> Option<Ordering>
fn partial_cmp(&self, other: &Approx<&[T]>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn le(&self, other: &Approx<&[T]>) -> bool
fn le(&self, other: &Approx<&[T]>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourcefn ge(&self, other: &Approx<&[T]>) -> bool
fn ge(&self, other: &Approx<&[T]>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
sourceimpl<T, A> PartialOrd<Approx<&SmallVec<A>>> for Approx<&SmallVec<A>> where
T: PartialOrd + Copy,
Approx<T>: PartialOrd,
A: Array<Item = T>,
impl<T, A> PartialOrd<Approx<&SmallVec<A>>> for Approx<&SmallVec<A>> where
T: PartialOrd + Copy,
Approx<T>: PartialOrd,
A: Array<Item = T>,
sourcefn partial_cmp(&self, other: &Approx<&SmallVec<A>>) -> Option<Ordering>
fn partial_cmp(&self, other: &Approx<&SmallVec<A>>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
sourcefn le(&self, other: &Approx<&SmallVec<A>>) -> bool
fn le(&self, other: &Approx<&SmallVec<A>>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourcefn ge(&self, other: &Approx<&SmallVec<A>>) -> bool
fn ge(&self, other: &Approx<&SmallVec<A>>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
sourceimpl<T> PartialOrd<Approx<&T>> for Approx<&T> where
T: PartialOrd + Copy,
Approx<T>: PartialOrd,
impl<T> PartialOrd<Approx<&T>> for Approx<&T> where
T: PartialOrd + Copy,
Approx<T>: PartialOrd,
sourcefn partial_cmp(&self, other: &Approx<&T>) -> Option<Ordering>
fn partial_cmp(&self, other: &Approx<&T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<T> PartialOrd<Approx<Option<T>>> for Approx<Option<T>> where
T: Copy + PartialOrd,
Approx<T>: PartialOrd,
impl<T> PartialOrd<Approx<Option<T>>> for Approx<Option<T>> where
T: Copy + PartialOrd,
Approx<T>: PartialOrd,
sourcefn partial_cmp(&self, other: &Approx<Option<T>>) -> Option<Ordering>
fn partial_cmp(&self, other: &Approx<Option<T>>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl PartialOrd<Approx<f64>> for Approx<f64>
impl PartialOrd<Approx<f64>> for Approx<f64>
sourcefn partial_cmp(&self, other: &Approx<f64>) -> Option<Ordering>
fn partial_cmp(&self, other: &Approx<f64>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<T: Copy> Copy for Approx<T>
impl<T> Eq for Approx<&[T]> where
T: Eq + Copy,
Approx<T>: Eq,
impl<T, A> Eq for Approx<&SmallVec<A>> where
T: PartialEq + Copy,
Approx<T>: PartialEq,
A: Array<Item = T>,
impl<T> Eq for Approx<&T> where
T: Copy + Eq,
Approx<T>: Eq,
impl Eq for Approx<Coordinate>
impl<T> Eq for Approx<Option<T>> where
T: Copy + Eq,
Approx<T>: Eq,
impl Eq for Approx<f64>
Auto Trait Implementations
impl<T> RefUnwindSafe for Approx<T> where
T: RefUnwindSafe,
impl<T> Send for Approx<T> where
T: Send,
impl<T> Sync for Approx<T> where
T: Sync,
impl<T> Unpin for Approx<T> where
T: Unpin,
impl<T> UnwindSafe for Approx<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.