Skip to main content

HandrailEvidence

Struct HandrailEvidence 

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

The handrails along a flight or run.

parts are the stretch’s straight parts (StretchPart), bottom to top: one for a straight flight or a run. pitch holds the positions where the pitch line starts, along the first part’s direction (a flight’s first nosing, a run’s lower end), and where it ends, along the last part’s (the last nosing or the upper floor’s edge, a run’s upper end). rails names every requested rail whose body runs along the stretch, each measured in the frame of one part: it overlaps the stretch along that part’s direction and lies within the request’s reach of its sides across it. A rail’s heights are computed, so the evidence is never exact.

Implementations§

Source§

impl HandrailEvidence

Source

pub fn try_new( request: HandrailRequest, direction: MetricDirection, pitch: (ElevationInterval, ElevationInterval), walking_sides: (ElevationInterval, ElevationInterval), rails: Vec<(ObjectId, RailMeasurement)>, evidence: Evidence, ) -> Result<Self, WalkingSurfaceError>

The handrails answering request along one straight part: the horizontal direction and the walking surface’s sides across it. Every rail must be requested, named once and measured in that part; they are kept in identity order.

Source

pub fn try_in_parts( request: HandrailRequest, parts: Vec<StretchPart>, pitch: (ElevationInterval, ElevationInterval), rails: Vec<(ObjectId, RailMeasurement)>, evidence: Evidence, ) -> Result<Self, WalkingSurfaceError>

The handrails answering request along the straight parts, bottom to top, at least one. Every rail must be requested, named once and measured in one of the parts; they are kept in identity order.

Source

pub fn request(&self) -> &HandrailRequest

The request this answers.

Source

pub fn parts(&self) -> &[StretchPart]

The stretch’s straight parts, bottom to top.

Source

pub fn direction(&self) -> MetricDirection

The first part’s horizontal walking direction: the stretch’s, when it is one part.

Source

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

Where the pitch line starts, along the first part’s direction, and where it ends, along the last part’s.

Source

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

Positions of the walking surface’s sides across the first part’s direction: the stretch’s, when it is one part.

Source

pub fn rails(&self) -> &[(ObjectId, RailMeasurement)]

The rails running along the stretch, in identity order.

Source

pub fn bottom_extension( &self, rail: &RailMeasurement, ) -> Option<MeasuredInterval>

How far a rail reaches beyond the bottom of the pitch line, along the first part’s direction: negative where it starts above it. None for a rail measured along a later part, which does not run along the first.

Source

pub fn top_extension(&self, rail: &RailMeasurement) -> Option<MeasuredInterval>

How far a rail reaches beyond the top of the pitch line, along the last part’s direction; None for a rail measured along an earlier part.

Source

pub fn side_rail( &self, side: RailSide, ) -> Result<Vec<&(ObjectId, RailMeasurement)>, Vec<ObjectId>>

The pieces of the handrail along side: every measured rail running along it (Self::side), bottom to top, part by part. Within a part, pieces are consecutive when each starts and ends decidably further along than the one before; two starting or ending where the positions cannot tell apart, or one lying within another’s stretch (a second rail beside or below it), leave the order undecided, and the pieces are returned as Err, named. No rail along the side is an empty rail.

Source

pub fn gap( &self, a: &RailMeasurement, b: &RailMeasurement, ) -> Option<MeasuredInterval>

The gap in plan between two rails: the least horizontal distance between the rectangles their bodies fill, each along its own part, zero where they touch or overlap, as an interval sure to hold it. None when a rail’s positions leave no rectangle it surely fills, so no upper bound.

Source

pub fn side(&self, rail: &RailMeasurement) -> Option<RailSide>

The side a rail runs along: the one whose half of its part’s walking surface holds it wholly across, None for a rail that may reach over the middle.

Source

pub fn evidence(&self) -> &Evidence

Reviewable provenance of the measurement.

Trait Implementations§

Source§

impl Clone for HandrailEvidence

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 Debug for HandrailEvidence

Source§

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

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

impl PartialEq for HandrailEvidence

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 HandrailEvidence

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.