pub struct BasicSortRef<'a> { /* private fields */ }
Implementations§
Source§impl<'a> BasicSortRef<'a>
impl<'a> BasicSortRef<'a>
Methods from Deref<Target = ATermRef<'a>>§
Sourcepub fn protect_global(&self) -> ATermGlobal
pub fn protect_global(&self) -> ATermGlobal
Protects the reference on the global protection pool.
Sourcepub fn upgrade<'b: 'a>(&'a self, parent: &ATermRef<'b>) -> ATermRef<'b>
pub fn upgrade<'b: 'a>(&'a self, parent: &ATermRef<'b>) -> ATermRef<'b>
This allows us to extend our borrowed lifetime from ’a to ’b based on existing parent term which has lifetime ’b.
The main usecase is to establish transitive lifetimes. For example given
a term t from which we borrow u = t.arg(0)
then we cannot have
u.arg(0) live as long as t since the intermediate temporary u is
dropped. However, since we know that u.arg(0) is a subterm of t
we can
upgrade its lifetime to the lifetime of t
using this function.
§Safety
This function might only be used if witness is a parent term of the current term.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Returns whether the term is the default term (not initialised)
Sourcepub fn is_empty_list(&self) -> bool
pub fn is_empty_list(&self) -> bool
Returns true iff this is the empty aterm_list
Sourcepub fn get_head_symbol(&self) -> SymbolRef<'_>
pub fn get_head_symbol(&self) -> SymbolRef<'_>
Returns the head function symbol of the term.
Sourcepub fn iter(&self) -> TermIterator<'_> ⓘ
pub fn iter(&self) -> TermIterator<'_> ⓘ
Returns an iterator over all arguments of the term that runs in pre order traversal of the term trees.
Sourcepub fn require_valid(&self)
pub fn require_valid(&self)
Panics if the term is default