pub struct SpatialPlacement {
pub contained_in: Option<EntityId>,
pub referenced_in: Vec<EntityId>,
}Expand description
Where one element sits in the spatial structure.
Fields§
§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§impl Debug for SpatialPlacement
impl Debug for SpatialPlacement
Source§impl Default for SpatialPlacement
impl Default for SpatialPlacement
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