#[non_exhaustive]pub struct SpatialPlacement {
pub contained_in: Option<EntityId>,
pub referenced_in: Vec<EntityId>,
}Expand description
Where one element sits in the spatial structure.
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.contained_in: Option<EntityId>The single containing structure, if the file states one.
Option, not Vec, because the schema says SET [0:1]. A file
stating two is malformed and reports ContainedTwice.
referenced_in: Vec<EntityId>Structures that reference this element, ascending by id.
Unbounded by the schema, so a Vec is the honest shape.
Implementations§
Source§impl SpatialPlacement
impl SpatialPlacement
Sourcepub fn all_structures(&self) -> Vec<EntityId>
pub fn all_structures(&self) -> Vec<EntityId>
Every structure this element relates to, containment first.
Convenience for callers that genuinely do not care which mechanism stated the link – but they must opt in, rather than the reader flattening the distinction for everyone.
Trait Implementations§
Source§impl Clone for SpatialPlacement
impl Clone for SpatialPlacement
Source§fn clone(&self) -> SpatialPlacement
fn clone(&self) -> SpatialPlacement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpatialPlacement
impl Debug for SpatialPlacement
Source§impl Default for SpatialPlacement
impl Default for SpatialPlacement
Source§fn default() -> SpatialPlacement
fn default() -> SpatialPlacement
Returns the “default value” for a type. Read more
impl Eq for SpatialPlacement
Source§impl PartialEq for SpatialPlacement
impl PartialEq for SpatialPlacement
impl StructuralPartialEq for SpatialPlacement
Auto Trait Implementations§
impl Freeze for SpatialPlacement
impl RefUnwindSafe for SpatialPlacement
impl Send for SpatialPlacement
impl Sync for SpatialPlacement
impl Unpin for SpatialPlacement
impl UnsafeUnpin for SpatialPlacement
impl UnwindSafe for SpatialPlacement
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