Skip to main content

RunStation

Struct RunStation 

Source
#[non_exhaustive]
pub struct RunStation { pub station: Station, pub seam: SeamSide, pub seam_window: Scalar, pub basis_end: Option<BasisEnd>, }
Expand description

A station of an offset run with the side of a seam it reads and its seam-snapping window (#301): the general form of the plain Station a CurveRelation::OffsetByStations takes, used by CurveRelation::OffsetsAtStations. It may also stand at its basis’s start or end, its distance measured by the kernel (#303).

Built with RunStation::new, RunStation::at_basis_start, RunStation::at_basis_end and the with_ methods, so that fields can be added without breaking callers. See the module documentation for how a run reads the side and the window, and its #303 section for the basis’s ends.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§station: Station

Distance along the basis and offsets in its frame there.

§seam: SeamSide

The piece read where the station stands on a seam its run does not decide: SeamSide::Outgoing unless set by Self::with_seam_side. Omitted from the wire format when it is Outgoing.

§seam_window: Scalar

The seam-snapping window (#294): a station within this distance of one seam of the basis stands ON it. 0 unless set by Self::with_seam_window. Omitted from the wire format when it is +0.0.

§basis_end: Option<BasisEnd>

The end of the basis the station stands at, its distance measured by the kernel (#303): None, the default, for the stated station.distance; otherwise that distance is 0 and not read (see the module documentation).

Format 1.3 of the graph’s wire format (ADR 0085): omitted when it is None, and an absent end reads as None.

Implementations§

Source§

impl RunStation

Source

pub const fn new(station: Station) -> Self

station, reading the outgoing piece on a seam, with no window.

Source

pub const fn at_basis_start(offsets: StationOffsets) -> Self

A station at the basis’s start with offsets (#303): distance 0, reading the outgoing piece, with no window.

Source

pub const fn at_basis_end(offsets: StationOffsets) -> Self

A station at the basis’s end with offsets (#303), reading the outgoing piece, with no window: its distance is the basis’s length by the kernel’s own measure, which the caller need not know (see the module documentation).

Source

pub const fn with_seam_side(self, side: SeamSide) -> Self

The same station reading side of a seam it stands on, where its run does not decide the side.

Source

pub const fn with_seam_window(self, window: Scalar) -> Self

The same station snapping onto a seam of its basis within window, in the basis’s station measure, by the #294 rule. A negative or non-finite window is refused when the node is pushed.

Trait Implementations§

Source§

impl Clone for RunStation

Source§

fn clone(&self) -> RunStation

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 RunStation

Source§

impl Debug for RunStation

Source§

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

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

impl<'de> Deserialize<'de> for RunStation

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<Station> for RunStation

Source§

fn from(station: Station) -> Self

The plain station: the outgoing piece, no window, what a station of an OffsetByStations means.

Source§

impl PartialEq for RunStation

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for RunStation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RunStation

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.