pub struct Reversed<S>(pub S);Expand description
Lift a strategy for (A, B) into the same strategy concept for (B, A).
Mirrors boost::geometry::reverse_dispatch<Geometry1, Geometry2> from
core/reverse_dispatch.hpp:33-64. Boost consults the ordering trait from
each algorithm’s dispatch specialisation; Rust implements each strategy
concept on this single wrapper instead.
Tuple Fields§
§0: STrait Implementations§
impl<S: Copy> Copy for Reversed<S>
Source§impl<A, B, S> DistanceStrategy<B, A> for Reversed<S>
impl<A, B, S> DistanceStrategy<B, A> for Reversed<S>
Source§type Out = <S as DistanceStrategy<A, B>>::Out
type Out = <S as DistanceStrategy<A, B>>::Out
The output scalar type. Typically the promoted scalar of
A and B. Mirrors
services::return_type<Strategy, P1, P2>::type from
strategies/distance/services.hpp.Source§type Comparable = Reversed<<S as DistanceStrategy<A, B>>::Comparable>
type Comparable = Reversed<<S as DistanceStrategy<A, B>>::Comparable>
The “skip the sqrt” form of this strategy. Read more
Source§fn comparable(&self) -> Self::Comparable
fn comparable(&self) -> Self::Comparable
Return the comparable-form companion of this strategy. Read more
Source§impl<A, B, S> IntersectsStrategy<B, A> for Reversed<S>where
S: IntersectsStrategy<A, B>,
impl<A, B, S> IntersectsStrategy<B, A> for Reversed<S>where
S: IntersectsStrategy<A, B>,
Auto Trait Implementations§
impl<S> Freeze for Reversed<S>where
S: Freeze,
impl<S> RefUnwindSafe for Reversed<S>where
S: RefUnwindSafe,
impl<S> Send for Reversed<S>where
S: Send,
impl<S> Sync for Reversed<S>where
S: Sync,
impl<S> Unpin for Reversed<S>where
S: Unpin,
impl<S> UnsafeUnpin for Reversed<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Reversed<S>where
S: UnwindSafe,
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