Skip to main content

RailMeasurement

Struct RailMeasurement 

Source
pub struct RailMeasurement { /* private fields */ }
Expand description

One handrail measured along a stretch.

A rail is measured in the frame of one part of the stretch, the first unless stated (Self::in_part). start and end are the positions of its body’s nearest and farthest points along that part’s direction, left and right of its lowest and highest points across it. lowest and highest bound the height of the top of its body above the pitch line (the nosing line of a flight, the surface of a run) where both run: the least and the greatest height along it, each as an interval sure to hold it. bottom_rise and top_rise are how much the top of its body rises and falls over the requested extension beyond each end of the pitch line, None where it does not reach that far or no extension was requested.

Implementations§

Source§

impl RailMeasurement

Source

pub fn try_new( (start, end): (ElevationInterval, ElevationInterval), (left, right): (ElevationInterval, ElevationInterval), lowest: MeasuredInterval, highest: MeasuredInterval, ) -> Result<Self, WalkingSurfaceError>

A rail spanning start to end along the stretch and left to right across it, its top lowest to highest above the pitch line. Each pair must be ordered.

Source

pub fn in_part(self, part: usize) -> Self

The rail measured in the frame of the stretch’s part part, by its index in HandrailEvidence::parts.

Source

pub fn part(&self) -> usize

The index of the part the rail is measured in.

Source

pub fn with_rises( self, bottom: Option<MeasuredInterval>, top: Option<MeasuredInterval>, ) -> Result<Self, WalkingSurfaceError>

The rail with the rise of its top over the extension beyond the bottom and the top of the pitch line. A rise is never negative.

Source

pub fn start(&self) -> ElevationInterval

Position of the rail’s nearest point along the stretch.

Source

pub fn end(&self) -> ElevationInterval

Position of the rail’s farthest point along the stretch.

Source

pub fn sides(&self) -> (ElevationInterval, ElevationInterval)

Positions of the rail’s lowest and highest points across the stretch.

Source

pub fn lowest(&self) -> MeasuredInterval

The least height of the rail’s top above the pitch line.

Source

pub fn highest(&self) -> MeasuredInterval

The greatest height of the rail’s top above the pitch line.

Source

pub fn bottom_rise(&self) -> Option<MeasuredInterval>

How much the rail’s top rises and falls over the extension beyond the bottom of the pitch line, when it reaches that far.

Source

pub fn top_rise(&self) -> Option<MeasuredInterval>

The same beyond the top of the pitch line.

Trait Implementations§

Source§

impl Clone for RailMeasurement

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RailMeasurement

Source§

impl Debug for RailMeasurement

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RailMeasurement

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RailMeasurement

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.