pub struct Path<const N: usize> {
pub xy: PathXY<N>,
pub t: Time<N>,
}Fields§
§xy: PathXY<N>§t: Time<N>Implementations§
Source§impl<const N: usize> Path<N>
impl<const N: usize> Path<N>
pub fn lat_lon(&self, i: usize) -> LatLon
pub fn get_segment(&self, i: usize) -> RouteSegment
pub fn len(&self) -> usize
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Always N == 0 — included for clippy’s len_without_is_empty lint;
every Path<N> with N >= 1 is non-empty by construction.
Sourcepub fn iter_segments(&self) -> SegmentIterator<'_, N> ⓘ
pub fn iter_segments(&self) -> SegmentIterator<'_, N> ⓘ
Iterates segment geometry only — (origin, destination) per pair.
For traversals that need per-segment departure/arrival times, use
Path::iter_with_running_clock instead.
Sourcepub fn iter_with_running_clock(
&self,
start_time: f64,
) -> ClockedSegmentIterator<'_, N> ⓘ
pub fn iter_with_running_clock( &self, start_time: f64, ) -> ClockedSegmentIterator<'_, N> ⓘ
Iterates segments while advancing an absolute clock starting at
start_time. Each yielded ClockedSegment carries t_depart
and t_arrive (absolute times at the segment endpoints) plus
segment_time (the segment’s stored duration, t[i + 1]).
Use this whenever a traversal needs cumulative timing — wind-field
integration, fuel accumulation, etc. — instead of hand-rolling the
dep += segment_time loop on top of iter_segments.
Trait Implementations§
Source§impl<const N: usize> FieldwiseClamp for Path<N>
impl<const N: usize> FieldwiseClamp for Path<N>
impl<const N: usize> Copy for Path<N>
impl<const N: usize> StructuralPartialEq for Path<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Path<N>
impl<const N: usize> RefUnwindSafe for Path<N>
impl<const N: usize> Send for Path<N>
impl<const N: usize> Sync for Path<N>
impl<const N: usize> Unpin for Path<N>
impl<const N: usize> UnsafeUnpin for Path<N>
impl<const N: usize> UnwindSafe for Path<N>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more