pub struct Reversed<S>(pub S);Expand description
Reversed<S> lifts an IntersectsStrategy<A, B> to an
IntersectsStrategy<B, A> by swapping the arguments.
Mirrors boost::geometry::reverse_dispatch
(core/reverse_dispatch.hpp) together with the partial
specialisation that uses it in
algorithms/detail/intersects/interface.hpp. Boost has one such
specialisation per algorithm; in Rust the symmetry is expressed
once with the blanket impl below — every concrete intersects pair
gets the swap for free.
Distinct from crate::distance::Reversed only because Rust does
not let a single newtype carry two unrelated blanket impls without
running into orphan / coherence collisions; we deliberately keep
the two algorithms’ adapters in their own namespaces.
Tuple Fields§
§0: STrait Implementations§
impl<S: Copy> Copy for Reversed<S>
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