pub struct CoLocatedStack {
pub layers: Vec<CoLocatedLayer>,
}Expand description
A stack of co-located reality layers at the same physical position (OCS §9).
Fields§
§layers: Vec<CoLocatedLayer>All layers at this position, ordered from physical base outward
Implementations§
Source§impl CoLocatedStack
impl CoLocatedStack
Sourcepub fn new(physical: CoLocatedLayer) -> Self
pub fn new(physical: CoLocatedLayer) -> Self
Creates a new CoLocatedStack.
Sourcepub fn add_layer(&mut self, layer: CoLocatedLayer)
pub fn add_layer(&mut self, layer: CoLocatedLayer)
Add a co-located layer (OCS §9).
Sourcepub fn physical_base(&self) -> &CoLocatedLayer
pub fn physical_base(&self) -> &CoLocatedLayer
Get the physical base layer.
Sourcepub fn fictional_layers(&self) -> Vec<&CoLocatedLayer>
pub fn fictional_layers(&self) -> Vec<&CoLocatedLayer>
Get all non-physical layers.
Sourcepub fn verify_isolation(&self) -> bool
pub fn verify_isolation(&self) -> bool
Verify paraconsistent isolation (OCS §9.2).
The lexical isolation rule: inner layers inherit spatial anchors from outer containers, but mutations in inner layers can never mutate or leak into parent layers.
Sourcepub fn check_no_mutation_leak(&self, layer_index: usize) -> bool
pub fn check_no_mutation_leak(&self, layer_index: usize) -> bool
Check that a mutation in a layer index doesn’t affect the physical base (OCS-T06).
Trait Implementations§
Source§impl Clone for CoLocatedStack
impl Clone for CoLocatedStack
Auto Trait Implementations§
impl Freeze for CoLocatedStack
impl RefUnwindSafe for CoLocatedStack
impl Send for CoLocatedStack
impl Sync for CoLocatedStack
impl Unpin for CoLocatedStack
impl UnsafeUnpin for CoLocatedStack
impl UnwindSafe for CoLocatedStack
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