pub struct DataFunctionSymbol { /* private fields */ }
Implementations§
Source§impl DataFunctionSymbol
impl DataFunctionSymbol
pub fn new(tp: &mut TermPool, name: &str) -> DataFunctionSymbol
Sourcepub fn sort(&self) -> SortExpressionRef<'_>
pub fn sort(&self) -> SortExpressionRef<'_>
Returns the sort of the function symbol.
Sourcepub fn operation_id(&self) -> usize
pub fn operation_id(&self) -> usize
Returns the internal operation id (a unique number) for the data::function_symbol.
Source§impl DataFunctionSymbol
impl DataFunctionSymbol
pub fn copy<'a>(&'a self) -> DataFunctionSymbolRef<'a>
Methods from Deref<Target = ATermRef<'static>>§
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
Trait Implementations§
Source§impl Borrow<ATerm> for DataFunctionSymbol
impl Borrow<ATerm> for DataFunctionSymbol
Source§impl Borrow<ATermRef<'static>> for DataFunctionSymbol
impl Borrow<ATermRef<'static>> for DataFunctionSymbol
Source§impl Clone for DataFunctionSymbol
impl Clone for DataFunctionSymbol
Source§fn clone(&self) -> DataFunctionSymbol
fn clone(&self) -> DataFunctionSymbol
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more