Struct move_stackless_bytecode::access_path_trie::TrieNode
source · [−]pub struct TrieNode<T: FootprintDomain> { /* private fields */ }
Expand description
A node in the access Trie: data
associated with the parent node + children
mapping offsets to child nodes
Implementations
sourceimpl<T: FootprintDomain> TrieNode<T>
impl<T: FootprintDomain> TrieNode<T>
pub fn new(data: T) -> Self
pub fn new_opt(data: Option<T>) -> Self
sourcepub fn join_data_opt_(data: &mut Option<T>, other: &Option<T>) -> JoinResult
pub fn join_data_opt_(data: &mut Option<T>, other: &Option<T>) -> JoinResult
Like join, but gracefully handles Non
data fields by treating None as Bottom
sourcepub fn join_data_opt(&mut self, other: &Option<T>) -> JoinResult
pub fn join_data_opt(&mut self, other: &Option<T>) -> JoinResult
Like join, but gracefully handles None
data fields by treating None as Bottom
pub fn join_child_data(&self, acc: Option<T>) -> Option<T>
pub fn get_child_data(&self) -> Option<T>
pub fn data(&self) -> &Option<T>
pub fn children(&self) -> &MapDomain<Offset, TrieNode<T>>
pub fn entry(&mut self, o: Offset) -> Entry<'_, Offset, TrieNode<T>>
sourcepub fn get_offset(&self, o: &Offset) -> Option<&Self>
pub fn get_offset(&self, o: &Offset) -> Option<&Self>
Return the node mapped to o
from self (if any)
sourcepub fn get_offset_mut(&mut self, o: &Offset) -> Option<&mut Self>
pub fn get_offset_mut(&mut self, o: &Offset) -> Option<&mut Self>
Return a mutable reference to the node mapped to o
from self (if any)
sourcepub fn remove_offset(&mut self, o: &Offset) -> Option<Self>
pub fn remove_offset(&mut self, o: &Offset) -> Option<Self>
Removes the node mapped to o
from self (if it exists)
sourcepub fn keys_statically_known(&self) -> bool
pub fn keys_statically_known(&self) -> bool
Return true if self
’s keys can be converted into a compact set of concrete access paths
Note: this says nothing about the data
part of self
sourcepub fn substitute_footprint<F>(
self,
actuals: &[TempIndex],
type_actuals: &[Type],
func_env: &FunctionEnv<'_>,
sub_map: &dyn AccessPathMap<AbsAddr>,
sub_data: F
) -> Self where
F: FnMut(&mut T, &[TempIndex], &[Type], &FunctionEnv<'_>, &dyn AccessPathMap<AbsAddr>) + Copy,
pub fn substitute_footprint<F>(
self,
actuals: &[TempIndex],
type_actuals: &[Type],
func_env: &FunctionEnv<'_>,
sub_map: &dyn AccessPathMap<AbsAddr>,
sub_data: F
) -> Self where
F: FnMut(&mut T, &[TempIndex], &[Type], &FunctionEnv<'_>, &dyn AccessPathMap<AbsAddr>) + Copy,
Bind caller data in actuals
, type_actuals
, and sub_map
to self
.
(1) Bind all free type variables in self
to type_actuals
(2) Apply sub_data
to self.data
and (recursively) to the data
fields of self.children
sourcepub fn iter_values<F>(&mut self, f: F) where
F: FnMut(&mut TrieNode<T>) + Copy,
pub fn iter_values<F>(&mut self, f: F) where
F: FnMut(&mut TrieNode<T>) + Copy,
Apply f
to each node in self
sourcepub fn iter_offsets<F>(&self, f: F) -> F where
F: FnMut(&Offset),
pub fn iter_offsets<F>(&self, f: F) -> F where
F: FnMut(&Offset),
Apply f
to each offset in self
Trait Implementations
sourceimpl<T: FootprintDomain> AbstractDomain for TrieNode<T>
impl<T: FootprintDomain> AbstractDomain for TrieNode<T>
fn join(&mut self, other: &Self) -> JoinResult
sourceimpl<T: Clone + FootprintDomain> Clone for TrieNode<T>
impl<T: Clone + FootprintDomain> Clone for TrieNode<T>
sourceimpl<T: Debug + FootprintDomain> Debug for TrieNode<T>
impl<T: Debug + FootprintDomain> Debug for TrieNode<T>
sourceimpl<T: FootprintDomain> Default for TrieNode<T>
impl<T: FootprintDomain> Default for TrieNode<T>
sourceimpl<T: PartialEq + FootprintDomain> PartialEq<TrieNode<T>> for TrieNode<T>
impl<T: PartialEq + FootprintDomain> PartialEq<TrieNode<T>> for TrieNode<T>
sourceimpl<T: PartialOrd + FootprintDomain> PartialOrd<TrieNode<T>> for TrieNode<T>
impl<T: PartialOrd + FootprintDomain> PartialOrd<TrieNode<T>> for TrieNode<T>
sourcefn partial_cmp(&self, other: &TrieNode<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &TrieNode<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<T: Eq + FootprintDomain> Eq for TrieNode<T>
impl<T: FootprintDomain> StructuralEq for TrieNode<T>
impl<T: FootprintDomain> StructuralPartialEq for TrieNode<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for TrieNode<T> where
T: RefUnwindSafe,
impl<T> Send for TrieNode<T> where
T: Send + Sync,
impl<T> Sync for TrieNode<T> where
T: Send + Sync,
impl<T> Unpin for TrieNode<T> where
T: Unpin,
impl<T> UnwindSafe for TrieNode<T> where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.