pub struct ExposedCache(UniValMap<ExposedCacheNode>);Expand description
Caches information about where in the tree exposed nodes with permission to do reads/ rites are
located. ExposedCache stores this information a single location (or rather, a range of
homogeneous locations) for all nodes in an allocation.
Nodes not in this map have a default ExposedCacheNode, i.e. they have no exposed children.
In particular, this map remains empty (and thus consumes no memory) until the first
node in the tree gets exposed.
Tuple Fields§
§0: UniValMap<ExposedCacheNode>Implementations§
Source§impl ExposedCache
impl ExposedCache
Returns the relatedness of a wildcard access to a node.
This function only considers a single subtree. If the current subtree does not contain
any valid exposed nodes then the function return None.
root: The root of the subtree the node belongs to.id: The id of the node.kind: The kind of the wildcard access.is_wildcard_tree: This nodes belongs to a wildcard subtree. This means we always treat foreign accesses as possible.only_foreign: Assume the access cannot come from a local node.
Sourcepub fn update_exposure(
&mut self,
nodes: &UniValMap<Node>,
id: UniIndex,
from: WildcardAccessLevel,
to: WildcardAccessLevel,
)
pub fn update_exposure( &mut self, nodes: &UniValMap<Node>, id: UniIndex, from: WildcardAccessLevel, to: WildcardAccessLevel, )
Update the tracking information of a tree, to reflect that the node specified by id is
now exposed with new_exposed_as permission.
Propagates the Willard access information over the tree. This needs to be called every time the access level of an exposed node changes, to keep the state in sync with the rest of the tree.
from: The previous access level of the exposed node. Set toNoneif the node was not exposed before.to: The new access level.
Trait Implementations§
Source§impl Clone for ExposedCache
impl Clone for ExposedCache
Source§fn clone(&self) -> ExposedCache
fn clone(&self) -> ExposedCache
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExposedCache
impl Debug for ExposedCache
Source§impl Default for ExposedCache
impl Default for ExposedCache
Source§fn default() -> ExposedCache
fn default() -> ExposedCache
Source§impl PartialEq for ExposedCache
impl PartialEq for ExposedCache
impl Eq for ExposedCache
impl StructuralPartialEq for ExposedCache
Auto Trait Implementations§
impl Freeze for ExposedCache
impl RefUnwindSafe for ExposedCache
impl Send for ExposedCache
impl Sync for ExposedCache
impl Unpin for ExposedCache
impl UnsafeUnpin for ExposedCache
impl UnwindSafe for ExposedCache
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes