Enum aterm::Term [] [src]

pub enum Term<Rec, Blob> {
    Int(i32),
    Long(i64),
    Real(BrokenF32),
    Application(StringBox<[Rec]>),
    List(Box<[Rec]>),
    Placeholder(TermPlaceholder<Rec>),
    Blob(Blob),
}

The basic term type, without annotations

Variants

An 32bit signed integer

A 64bit signed integer. This is an optional component in the spec, but it's easy to support.

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.

The main thing: Application of a constructor, using a string for the constructor name.

A list of ATerms.

A placeholder for pattern matching. Only here for compatibility with the spec, use Rust's pattern matching facilities instead!

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]

Formats the value using the given formatter.

impl<Rec: PartialEq, Blob: PartialEq> PartialEq for Term<Rec, Blob>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<Rec: Hash, Blob: Hash> Hash for Term<Rec, Blob>
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl<Rec, B> Display for Term<Rec, B> where
    Rec: ATermWrite,
    B: ATermWrite
[src]

Formats the value using the given formatter. Read more

impl<Rec, B> ATermWrite for Term<Rec, B> where
    Rec: ATermWrite,
    B: ATermWrite
[src]