#[non_exhaustive]pub enum BankError {
RailHeadDistance(f64),
CantExceedsRailHeadDistance {
cant: f64,
rail_head_distance: f64,
},
CantExceedsVerticalSpan {
cant: f64,
span: f64,
},
AngleOutOfRange {
angle: f64,
},
OutsideLaw {
law: &'static str,
distance: f64,
},
AngleInPivot,
NonFinite,
RailInCant,
}Expand description
Why a banked curve has no section at a station.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RailHeadDistance(f64)
The rail-head distance is not positive and finite.
CantExceedsRailHeadDistance
|D| > b: the rail heads cannot differ by more than they are apart.
CantExceedsVerticalSpan
Under BankConvention::VerticalRise, |D| > b cos(theta): the
grade leaves the rail heads too little vertical reach for the cant.
AngleOutOfRange
A bank angle beyond a quarter turn.
OutsideLaw
The named law is malformed or has no value at the distance.
AngleInPivot
The pivot law has an angle-form piece; a pivot is an elevation.
NonFinite
A non-finite cant, angle or grade.
RailInCant
The cant law has a held-rail piece (CantForm::AboutRail); only
a pivot derives from the cant.
Trait Implementations§
impl Copy for BankError
Source§impl Error for BankError
impl Error for BankError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for BankError
Auto Trait Implementations§
impl Freeze for BankError
impl RefUnwindSafe for BankError
impl Send for BankError
impl Sync for BankError
impl Unpin for BankError
impl UnsafeUnpin for BankError
impl UnwindSafe for BankError
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