#[non_exhaustive]pub enum Profile {
Rectangle(RectangleProfile),
Circle(CircleProfile),
Ellipse(EllipseProfile),
Section(SectionProfile),
Contour(ContourProfile),
Derived {
basis: Box<Profile>,
transform: DAffine2,
},
Composite(Vec<Profile>),
CenterLine(CenterLineProfile),
}Expand description
Format-neutral profile representation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Rectangle(RectangleProfile)
Rectangle or rounded rectangle.
Circle(CircleProfile)
Circle or annulus.
Ellipse(EllipseProfile)
Ellipse.
Section(SectionProfile)
Structural parameterized section.
Contour(ContourProfile)
Arbitrary exact contour with holes.
Derived
Profile transformed from another profile.
Placement is recorded as a transform over the exact basis, not by transforming tessellated points, so a placed circle stays a circle.
Composite(Vec<Profile>)
Ordered collection of profiles used as one section.
CenterLine(CenterLineProfile)
Open path plus a constant width, centred on the path.
Distinct from Profile::Contour because the area is implied by an
offset rather than bounded explicitly. A consumer that cannot offset
must refuse this rather than treat the path as a boundary: the path is
open, so reading it as a contour yields a degenerate zero-area region.
Trait Implementations§
impl BuiltInNode for Profile
Source§impl<'de> Deserialize<'de> for Profile
impl<'de> Deserialize<'de> for Profile
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Profile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Profile, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Profile> for GeometryNode
impl From<Profile> for GeometryNode
Source§fn from(value: Profile) -> GeometryNode
fn from(value: Profile) -> GeometryNode
Converts to this type from the input type.
Source§impl Serialize for Profile
impl Serialize for Profile
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Profile
Source§impl ValidateProfile<Profile> for ExactProfileValidator
impl ValidateProfile<Profile> for ExactProfileValidator
Source§type Report = ProfileReport
type Report = ProfileReport
Structured validation report.
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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