pub struct Segment<P> {
pub start: P,
pub end: P,
}Expand description
A bounded linear span between two endpoints.
A segment is stored by its endpoints rather than an origin/direction pair
with an interval, because endpoint identity is what topology and imported
data actually carry. The natural parameterisation is start + t * (end - start) over t in [0, 1]; keeping that implicit avoids inventing a
parameter range the source never stated.
Fields§
§start: PEndpoint at parameter zero.
end: PEndpoint at parameter one.
Trait Implementations§
impl<P: Copy> Copy for Segment<P>
impl<P: PartialEq> StructuralPartialEq for Segment<P>
Auto Trait Implementations§
impl<P> Freeze for Segment<P>where
P: Freeze,
impl<P> RefUnwindSafe for Segment<P>where
P: RefUnwindSafe,
impl<P> Send for Segment<P>where
P: Send,
impl<P> Sync for Segment<P>where
P: Sync,
impl<P> Unpin for Segment<P>where
P: Unpin,
impl<P> UnsafeUnpin for Segment<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for Segment<P>where
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