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 duplicate 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§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> Freeze for IntersectionResult<F, P>where
P: Freeze,
impl<F, P> RefUnwindSafe for IntersectionResult<F, P>where
P: RefUnwindSafe,
F: 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
P: UnwindSafe,
F: 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