Skip to main content

TreadFlight

Struct TreadFlight 

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

A stair flight measured from its body.

The flight rises from base, its body’s lowest point, through its treads in ascending order, to top, its body’s highest point. The first riser runs from the base to the first tread: the flight is taken to stand on the level it starts from. When the top lies above the last tread, the flight ends in a riser from the last tread to the top, meeting the upper floor; when it lies no higher than the last tread’s surface, the last tread is the top step. A top the intervals cannot place either way is refused.

Implementations§

Source§

impl TreadFlight

Source

pub fn try_new( request: TreadFlightRequest, walking_line: WalkingLine, base: ElevationInterval, top: ElevationInterval, treads: Vec<Tread>, evidence: Evidence, ) -> Result<Self, WalkingSurfaceError>

The flight answering request, climbing along walking_line.

Treads must be given bottom to top, strictly ascending in elevation and in front position; the base must lie below the first tread and the top at or above the last, decidably. A straight line must be horizontal, a turning one at least two distinct plan points. The evidence is exact exactly when every position is a point.

Source

pub fn with_final_riser(self, riser: RiserClosure) -> Self

The flight with whether its final riser, from the last tread to the top, closes the step; ignored when the flight ends on its last tread.

Source

pub fn request(&self) -> &TreadFlightRequest

The request this answers.

Source

pub fn object(&self) -> &ObjectId

The measured object.

Source

pub fn walking_line(&self) -> &WalkingLine

The line the flight climbs along.

Source

pub fn base(&self) -> ElevationInterval

Elevation of the body’s lowest point, where the first riser starts.

Source

pub fn top(&self) -> ElevationInterval

Elevation of the body’s highest point.

Source

pub fn treads(&self) -> &[Tread]

The treads, bottom to top.

Source

pub fn ends_in_riser(&self) -> bool

Whether the flight ends in a riser above its last tread.

Source

pub fn risers(&self) -> Vec<MeasuredInterval>

Riser heights, bottom to top: from the base to the first tread, between consecutive treads, and from the last tread to the top when the flight ends in a riser. Their number is the flight’s number of risers (steps).

Source

pub fn riser_closures(&self) -> Vec<RiserClosure>

Whether each riser closes its step, in the order of Self::risers: the riser below each tread, then the final riser when the flight ends in one.

Source

pub fn goings(&self) -> Vec<MeasuredInterval>

Goings, bottom to top: the distance along the walking line from each tread’s nosing to the next one’s. A flight of n treads has n - 1 goings.

Source

pub fn nosings(&self) -> Vec<MeasuredInterval>

Nosing projections, bottom to top: how far each tread above the first reaches over the tread below it, the lower tread’s back less the upper tread’s front. Zero or less where it does not overhang.

Source

pub fn winder_angles(&self) -> Vec<Option<MeasuredInterval>>

Winder angles, bottom to top: for each tread below the last, the plan angle between its nosing and the next tread’s, 0 for a straight tread. None where a nosing is not measured or too short for its uncertainty to fix a direction.

Source

pub fn rise(&self) -> MeasuredInterval

The flight’s rise: from the base to the top of its last riser.

Source

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

The flight’s width: its narrowest tread’s, when every tread’s sides were measured.

Source

pub fn is_exact(&self) -> bool

Whether every position is known exactly.

Source

pub fn evidence(&self) -> &Evidence

Reviewable provenance of the measurement.

Trait Implementations§

Source§

impl Clone for TreadFlight

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 TreadFlight

Source§

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

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

impl PartialEq for TreadFlight

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 TreadFlight

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.