Enum aterm::Term
[−]
[src]
pub enum Term<Rec, Blob> { Int(i32), Long(i64), Real(BrokenF32), Application(String, Box<[Rec]>), List(Box<[Rec]>), Placeholder(TermPlaceholder<Rec>), Blob(Blob), }
The basic term type, without annotations
Variants
Int(i32)
An 32bit signed integer
Long(i64)
A 64bit signed integer. This is an optional component in the spec, but it's easy to support.
Real(BrokenF32)
An 32bit floating point number, but with a broken equality so a coherent implementation of Hash could be given (if NaN != NaN, then what Hash should it get?). You shouldn't directly check equality of floating point numbers anyways because of rounding.
Application(String, Box<[Rec]>)
The main thing: Application of a constructor, using a string for the constructor name.
List(Box<[Rec]>)
A list of ATerms.
Placeholder(TermPlaceholder<Rec>)
A placeholder for pattern matching. Only here for compatibility with the spec, use Rust's pattern matching facilities instead!
Blob(Blob)
A Binary Large OBject. Here used to embed any other type. But note it will need to implement some traits if you still want to parse or print it.
Trait Implementations
impl<Rec: Debug, Blob: Debug> Debug for Term<Rec, Blob>
[src]
impl<Rec: PartialEq, Blob: PartialEq> PartialEq for Term<Rec, Blob>
[src]
fn eq(&self, __arg_0: &Term<Rec, Blob>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Term<Rec, Blob>) -> bool
This method tests for !=
.
impl<Rec: Eq, Blob: Eq> Eq for Term<Rec, Blob>
[src]
impl<Rec: Clone, Blob: Clone> Clone for Term<Rec, Blob>
[src]
fn clone(&self) -> Term<Rec, Blob>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<Rec: Hash, Blob: Hash> Hash for Term<Rec, Blob>
[src]
fn hash<__HRecBlob: Hasher>(&self, __arg_0: &mut __HRecBlob)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the state provided.
impl<Rec, B> Display for Term<Rec, B> where
Rec: ATermWrite,
B: ATermWrite,
[src]
Rec: ATermWrite,
B: ATermWrite,
impl<Rec, B> ATermWrite for Term<Rec, B> where
Rec: ATermWrite,
B: ATermWrite,
[src]
Rec: ATermWrite,
B: ATermWrite,