pub enum Term<PT: ProtocolTypes> {
Variable(Variable<PT>),
Application(Function<PT>, Vec<Term<PT>>),
}
Variants§
Variable(Variable<PT>)
A concrete but unspecified Term
(e.g. x
, y
).
See Variable
for more information.
Application(Function<PT>, Vec<Term<PT>>)
Implementations§
source§impl<PT: ProtocolTypes> Term<PT>
impl<PT: ProtocolTypes> Term<PT>
pub fn resistant_id(&self) -> u32
pub fn size(&self) -> usize
pub fn is_leaf(&self) -> bool
pub fn get_type_shape(&self) -> &TypeShape<PT>
pub fn name(&self) -> &str
pub fn mutate(&mut self, other: Term<PT>)
fn display_at_depth(&self, depth: usize) -> String
pub fn evaluate<PB>(
&self,
context: &TraceContext<PB>,
) -> Result<Box<dyn EvaluatedTerm<PT>>, Error>where
PB: ProtocolBehavior<ProtocolTypes = PT>,
source§impl<PT: ProtocolTypes> Term<PT>
impl<PT: ProtocolTypes> Term<PT>
fn unique_id(&self, tree_mode: bool, cluster_id: usize) -> String
fn node_attributes( displayable: impl Display, color: &str, shape: &str, ) -> String
fn collect_statements( term: &Term<PT>, tree_mode: bool, cluster_id: usize, statements: &mut Vec<String>, )
sourcepub fn dot_subgraph(
&self,
tree_mode: bool,
cluster_id: usize,
label: &str,
) -> String
pub fn dot_subgraph( &self, tree_mode: bool, cluster_id: usize, label: &str, ) -> String
If tree_mode
is true then each subgraph is self-contained and does not reference other
clusters or nodes outside of this subgraph. Therefore, only trees are generated. If it is
false, then graphs are rendered.
source§impl<PT: ProtocolTypes> Term<PT>
impl<PT: ProtocolTypes> Term<PT>
pub fn count_functions_by_name(&self, find_name: &'static str) -> usize
Trait Implementations§
source§impl<'de, PT> Deserialize<'de> for Term<PT>where
PT: ProtocolTypes,
impl<'de, PT> Deserialize<'de> for Term<PT>where
PT: ProtocolTypes,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<PT: ProtocolTypes> Display for Term<PT>
impl<PT: ProtocolTypes> Display for Term<PT>
source§impl<'a, PT: ProtocolTypes> IntoIterator for &'a Term<PT>
impl<'a, PT: ProtocolTypes> IntoIterator for &'a Term<PT>
Having the same mutator for &’a mut Term is not possible in Rust:
source§impl<PT> Serialize for Term<PT>where
PT: ProtocolTypes,
impl<PT> Serialize for Term<PT>where
PT: ProtocolTypes,
impl<PT: Eq + ProtocolTypes> Eq for Term<PT>
impl<PT: ProtocolTypes> StructuralPartialEq for Term<PT>
Auto Trait Implementations§
impl<PT> Freeze for Term<PT>
impl<PT> !RefUnwindSafe for Term<PT>
impl<PT> Send for Term<PT>
impl<PT> Sync for Term<PT>
impl<PT> Unpin for Term<PT>
impl<PT> !UnwindSafe for Term<PT>
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
Mutably borrows from an owned value. Read more
§impl<T> CloneAny for T
impl<T> CloneAny for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting [
TupleList
], of an [Prepend::prepend()
] call,
including the prepended entry.