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§

source§

impl<T: FootprintDomain> TrieNode<T>

source

pub fn new(data: T) -> Self

source

pub fn new_opt(data: Option<T>) -> Self

source

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

source

pub fn join_data_opt(&mut self, other: &Option<T>) -> JoinResult

Like join, but gracefully handles None data fields by treating None as Bottom

source

pub fn join_child_data(&self, acc: Option<T>) -> Option<T>

source

pub fn get_child_data(&self) -> Option<T>

source

pub fn data(&self) -> &Option<T>

source

pub fn children(&self) -> &MapDomain<Offset, TrieNode<T>>

source

pub fn entry(&mut self, o: Offset) -> Entry<'_, Offset, TrieNode<T>>

source

pub fn get_offset(&self, o: &Offset) -> Option<&Self>

Return the node mapped to o from self (if any)

source

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)

source

pub fn remove_offset(&mut self, o: &Offset) -> Option<Self>

Removes the node mapped to o from self (if it exists)

source

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

source

pub fn substitute_footprint<F>( self, actuals: &[TempIndex], type_actuals: &[Type], func_env: &FunctionEnv<'_>, sub_map: &dyn AccessPathMap<AbsAddr>, sub_data: F ) -> Selfwhere 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

source

pub fn iter_values<F>(&mut self, f: F)where F: FnMut(&mut TrieNode<T>) + Copy,

Apply f to each node in self

source

pub fn iter_offsets<F>(&self, f: F) -> Fwhere F: FnMut(&Offset),

Apply f to each offset in self

Trait Implementations§

source§

impl<T: FootprintDomain> AbstractDomain for TrieNode<T>

source§

fn join(&mut self, other: &Self) -> JoinResult

source§

impl<T: Clone + FootprintDomain> Clone for TrieNode<T>

source§

fn clone(&self) -> TrieNode<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + FootprintDomain> Debug for TrieNode<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: FootprintDomain> Default for TrieNode<T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T: PartialEq + FootprintDomain> PartialEq<TrieNode<T>> for TrieNode<T>

source§

fn eq(&self, other: &TrieNode<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: PartialOrd + FootprintDomain> PartialOrd<TrieNode<T>> for TrieNode<T>

source§

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 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<T: Eq + FootprintDomain> Eq for TrieNode<T>

source§

impl<T: FootprintDomain> StructuralEq for TrieNode<T>

source§

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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V