#[non_exhaustive]pub struct SectionAtStation {
pub profile: NodeId,
pub station: Station,
pub tags: Vec<String>,
pub orientation: StationOrientation,
pub seam: SeamSide,
pub seam_window: f64,
}Expand description
A section standing at a station, with optional tags and an optional
explicit orientation (#246): the general form of StationedSection
(closed) and StationedOpenSection (open).
Built with SectionAtStation::new and the with_ methods, so that
fields can be added without breaking callers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.profile: NodeIdThe profile node: an area profile in a sectioned spine, an open profile in a sectioned surface.
station: StationDistance along the directrix and offsets of the profile’s origin, in the base frame.
One tag per vertex, or empty to match by index; see the module documentation.
orientation: StationOrientationThe section’s orientation in the base frame; the default is the base frame.
seam: SeamSideThe piece read where the section stands on a seam its run does not
decide (#301): SeamSide::Outgoing unless set by
Self::with_seam_side. See the
module documentation for
where a run reads it.
Format 1.2 of the graph’s wire format (ADR 0085): omitted when it
is Outgoing, and an absent side reads as Outgoing.
seam_window: f64The seam-snapping window (#294, #301): a section within this
distance of one seam of the directrix stands ON that seam. 0
unless set by Self::with_seam_window, which is the arc-length
tolerance alone.
Format 1.2 of the graph’s wire format (ADR 0085): omitted when it
is +0.0, and an absent window reads as 0.
Implementations§
Source§impl SectionAtStation
impl SectionAtStation
Sourcepub const fn new(profile: NodeId, station: Station) -> SectionAtStation
pub const fn new(profile: NodeId, station: Station) -> SectionAtStation
profile at station, untagged, in the base frame.
The same section with tags, one per vertex.
Sourcepub const fn with_orientation(
self,
orientation: StationOrientation,
) -> SectionAtStation
pub const fn with_orientation( self, orientation: StationOrientation, ) -> SectionAtStation
The same section turned by orientation.
Sourcepub const fn with_seam_side(self, side: SeamSide) -> SectionAtStation
pub const fn with_seam_side(self, side: SeamSide) -> SectionAtStation
The same section reading side of a seam it stands on, where its
run does not decide the side (#301; see the
module documentation).
Sourcepub const fn with_seam_window(self, window: f64) -> SectionAtStation
pub const fn with_seam_window(self, window: f64) -> SectionAtStation
The same section snapping onto a seam of the directrix within
window (#301), in the directrix’s station measure, by the #294
rule. 0 is no window beyond the arc-length tolerance; a negative
or non-finite window is refused when the node is pushed.
Trait Implementations§
Source§impl Clone for SectionAtStation
impl Clone for SectionAtStation
Source§fn clone(&self) -> SectionAtStation
fn clone(&self) -> SectionAtStation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SectionAtStation
impl Debug for SectionAtStation
Source§impl<'de> Deserialize<'de> for SectionAtStation
impl<'de> Deserialize<'de> for SectionAtStation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SectionAtStation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SectionAtStation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<StationedOpenSection> for SectionAtStation
impl From<StationedOpenSection> for SectionAtStation
Source§fn from(section: StationedOpenSection) -> SectionAtStation
fn from(section: StationedOpenSection) -> SectionAtStation
Source§impl From<StationedSection> for SectionAtStation
impl From<StationedSection> for SectionAtStation
Source§fn from(section: StationedSection) -> SectionAtStation
fn from(section: StationedSection) -> SectionAtStation
Source§impl PartialEq for SectionAtStation
impl PartialEq for SectionAtStation
Source§impl Serialize for SectionAtStation
impl Serialize for SectionAtStation
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for SectionAtStation
Auto Trait Implementations§
impl Freeze for SectionAtStation
impl RefUnwindSafe for SectionAtStation
impl Send for SectionAtStation
impl Sync for SectionAtStation
impl Unpin for SectionAtStation
impl UnsafeUnpin for SectionAtStation
impl UnwindSafe for SectionAtStation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more