pub enum IntersectionResult<F: Float, P: PointLike<F>> {
Intersection(Intersection<F, P>),
Parallel,
None,
}Variants§
Implementations§
source§impl<F: Float, P: PointLike<F>> IntersectionResult<F, P>
impl<F: Float, P: PointLike<F>> IntersectionResult<F, P>
sourcepub fn is_intersection(&self) -> bool
pub fn is_intersection(&self) -> bool
Returns true if the intersection result is Intersection.
sourcepub fn try_into_intersection(self) -> Result<Intersection<F, P>, Self>
pub fn try_into_intersection(self) -> Result<Intersection<F, P>, Self>
Convert from IntersectionResult<F, P> to Result<Intersection<F, P>, Self>.
Converts IntersectionResult::Parallel or IntersectionResult::None to Err(self).
sourcepub fn as_intersection(&self) -> Option<&Intersection<F, P>>
pub fn as_intersection(&self) -> Option<&Intersection<F, P>>
Convert from IntersectionResult<F, P> to Option<&Intersection<F, P>>.
Discards IntersectionResult::Parallel and IntersectionResult::None variants.
Trait Implementations§
source§impl<F: Clone + Float, P: Clone + PointLike<F>> Clone for IntersectionResult<F, P>
impl<F: Clone + Float, P: Clone + PointLike<F>> Clone for IntersectionResult<F, P>
source§fn clone(&self) -> IntersectionResult<F, P>
fn clone(&self) -> IntersectionResult<F, P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<F: PartialEq + Float, P: PartialEq + PointLike<F>> PartialEq for IntersectionResult<F, P>
impl<F: PartialEq + Float, P: PartialEq + PointLike<F>> PartialEq for IntersectionResult<F, P>
source§fn eq(&self, other: &IntersectionResult<F, P>) -> bool
fn eq(&self, other: &IntersectionResult<F, P>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<F: Float, P: PointLike<F>> PrecisionRound for IntersectionResult<F, P>
impl<F: Float, P: PointLike<F>> PrecisionRound for IntersectionResult<F, P>
impl<F: Float, P: PointLike<F>> StructuralPartialEq for IntersectionResult<F, P>
Auto Trait Implementations§
impl<F, P> RefUnwindSafe for IntersectionResult<F, P>where
F: RefUnwindSafe,
P: RefUnwindSafe,
impl<F, P> Send for IntersectionResult<F, P>
impl<F, P> Sync for IntersectionResult<F, P>
impl<F, P> Unpin for IntersectionResult<F, P>
impl<F, P> UnwindSafe for IntersectionResult<F, P>where
F: UnwindSafe,
P: 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