#[non_exhaustive]pub struct BodyDescription {
pub product: EntityId,
pub representation: EntityId,
pub items: Vec<BodyItem>,
}Expand description
The Body representation of one product, one entry per geometric item.
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.product: EntityIdThe product described.
representation: EntityIdThe representation selected as the body
(crate::select_shape_representation).
items: Vec<BodyItem>One entry per geometric item, mapped items resolved, in authored order.
Implementations§
Source§impl BodyDescription
impl BodyDescription
Sourcepub fn sole_item(&self) -> Option<&BodyItem>
pub fn sole_item(&self) -> Option<&BodyItem>
The only item, when the body has exactly one.
None for an empty body and for a body of several items; a caller
that needs every item reads Self::items.
Trait Implementations§
Source§impl Clone for BodyDescription
impl Clone for BodyDescription
Source§impl Debug for BodyDescription
impl Debug for BodyDescription
Source§impl PartialEq for BodyDescription
impl PartialEq for BodyDescription
impl StructuralPartialEq for BodyDescription
Auto Trait Implementations§
impl Freeze for BodyDescription
impl RefUnwindSafe for BodyDescription
impl Send for BodyDescription
impl Sync for BodyDescription
impl Unpin for BodyDescription
impl UnsafeUnpin for BodyDescription
impl UnwindSafe for BodyDescription
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