pub struct LengthInterval { /* private fields */ }Expand description
Conservative bounds for a non-negative metric length in metres.
Implementations§
Source§impl LengthInterval
impl LengthInterval
Sourcepub fn try_new(
lower_metres: f64,
upper_metres: f64,
) -> Result<Self, MetricRoutingError>
pub fn try_new( lower_metres: f64, upper_metres: f64, ) -> Result<Self, MetricRoutingError>
Validates inclusive lower and upper distance bounds.
Sourcepub fn exact(metres: f64) -> Result<Self, MetricRoutingError>
pub fn exact(metres: f64) -> Result<Self, MetricRoutingError>
Creates a zero-error interval.
Sourcepub fn lower_metres(&self) -> f64
pub fn lower_metres(&self) -> f64
Inclusive lower bound in metres.
Sourcepub fn upper_metres(&self) -> f64
pub fn upper_metres(&self) -> f64
Inclusive upper bound in metres.
Sourcepub fn compare_maximum(
&self,
maximum_metres: f64,
) -> Result<ThresholdVerdict, MetricRoutingError>
pub fn compare_maximum( &self, maximum_metres: f64, ) -> Result<ThresholdVerdict, MetricRoutingError>
Compares this interval to an inclusive maximum without collapsing uncertainty.
Trait Implementations§
Source§impl Clone for LengthInterval
impl Clone for LengthInterval
Source§fn clone(&self) -> LengthInterval
fn clone(&self) -> LengthInterval
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LengthInterval
impl Debug for LengthInterval
Source§impl PartialEq for LengthInterval
impl PartialEq for LengthInterval
impl Copy for LengthInterval
impl StructuralPartialEq for LengthInterval
Auto Trait Implementations§
impl Freeze for LengthInterval
impl RefUnwindSafe for LengthInterval
impl Send for LengthInterval
impl Sync for LengthInterval
impl Unpin for LengthInterval
impl UnwindSafe for LengthInterval
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