#[non_exhaustive]pub enum StationCurve<'c> {
Two(&'c Curve2),
Three(&'c Curve3),
Offset(StationOffset<'c>),
}Expand description
The atomic curve under a StationPiece.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Two(&'c Curve2)
A 2D curve, lying in z = 0.
Three(&'c Curve3)
A 3D curve.
Offset(StationOffset<'c>)
An offset of a base piece, measured in its own length (#289; see the offset module).
Implementations§
Source§impl<'c> StationCurve<'c>
impl<'c> StationCurve<'c>
Sourcepub fn from_path_curve(
curve: &'c PathCurve,
) -> Result<StationCurve<'c>, GeomError>
pub fn from_path_curve( curve: &'c PathCurve, ) -> Result<StationCurve<'c>, GeomError>
The station curve of a path piece’s curve, borrowed from it.
§Errors
A piece kind this evaluator does not know, by name.
Source§impl StationCurve<'_>
impl StationCurve<'_>
Sourcepub fn convention(self) -> DistanceConvention
pub fn convention(self) -> DistanceConvention
The distance convention a station on this curve is measured in: plan distance on an elevated or banked curve, arc length on every other (a 2D curve’s arc length is its plan length). An offset is measured as its base is (#289).
Sourcepub fn parameter_at_bound(self, bound: PathBound) -> Result<f64, GeomError>
pub fn parameter_at_bound(self, bound: PathBound) -> Result<f64, GeomError>
The native parameter a path piece bound names on the curve (#304): a parameter as it is, a point the one parameter naming it (see the path-bound module).
§Errors
A bound that is not finite; a point off the curve, named by several parameters, or on a curve this evaluator does not invert; each by name.
Trait Implementations§
Source§impl<'c> Clone for StationCurve<'c>
impl<'c> Clone for StationCurve<'c>
Source§fn clone(&self) -> StationCurve<'c>
fn clone(&self) -> StationCurve<'c>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'c> Copy for StationCurve<'c>
Source§impl<'c> Debug for StationCurve<'c>
impl<'c> Debug for StationCurve<'c>
Source§impl From<StationCurve<'_>> for PathCurve
impl From<StationCurve<'_>> for PathCurve
Source§fn from(curve: StationCurve<'_>) -> PathCurve
fn from(curve: StationCurve<'_>) -> PathCurve
The curve, copied.
Source§impl<'c> PartialEq for StationCurve<'c>
impl<'c> PartialEq for StationCurve<'c>
impl<'c> StructuralPartialEq for StationCurve<'c>
Auto Trait Implementations§
impl<'c> Freeze for StationCurve<'c>
impl<'c> RefUnwindSafe for StationCurve<'c>
impl<'c> Send for StationCurve<'c>
impl<'c> Sync for StationCurve<'c>
impl<'c> Unpin for StationCurve<'c>
impl<'c> UnsafeUnpin for StationCurve<'c>
impl<'c> UnwindSafe for StationCurve<'c>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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