#[non_exhaustive]pub struct StationOffset<'c> { /* private fields */ }Expand description
An offset of one base piece, measured in its own length; see the module documentation.
Implementations§
Source§impl<'c> StationOffset<'c>
impl<'c> StationOffset<'c>
Sourcepub fn new(
base: StationPiece<'c>,
law: OffsetLaw,
) -> Result<StationOffset<'c>, GeomError>
pub fn new( base: StationPiece<'c>, law: OffsetLaw, ) -> Result<StationOffset<'c>, GeomError>
The offset of base by law.
§Errors
A base that is itself an offset, a base span with a seam of its curve strictly inside it, a planar law on a 3D base, a non-finite law or a zero reference direction, each by name.
Sourcepub fn base(&self) -> StationPiece<'c>
pub fn base(&self) -> StationPiece<'c>
The base piece.
Sourcepub fn convention(&self) -> DistanceConvention
pub fn convention(&self) -> DistanceConvention
The convention the offset is measured in: its base’s (plan distance beside an elevated or banked curve, arc length beside any other).
Trait Implementations§
Source§impl<'c> Clone for StationOffset<'c>
impl<'c> Clone for StationOffset<'c>
Source§fn clone(&self) -> StationOffset<'c>
fn clone(&self) -> StationOffset<'c>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'c> Copy for StationOffset<'c>
Source§impl<'c> Debug for StationOffset<'c>
impl<'c> Debug for StationOffset<'c>
Source§impl<'c> PartialEq for StationOffset<'c>
impl<'c> PartialEq for StationOffset<'c>
impl<'c> StructuralPartialEq for StationOffset<'c>
Auto Trait Implementations§
impl<'c> Freeze for StationOffset<'c>
impl<'c> RefUnwindSafe for StationOffset<'c>
impl<'c> Send for StationOffset<'c>
impl<'c> Sync for StationOffset<'c>
impl<'c> Unpin for StationOffset<'c>
impl<'c> UnsafeUnpin for StationOffset<'c>
impl<'c> UnwindSafe for StationOffset<'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
Mutably borrows from an owned value. Read more
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> ⓘ
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