Enum eetf::Term [] [src]

pub enum Term {
    Atom(Atom),
    FixInteger(FixInteger),
    BigInteger(BigInteger),
    Float(Float),
    Pid(Pid),
    Port(Port),
    Reference(Reference),
    ExternalFun(ExternalFun),
    InternalFun(InternalFun),
    Binary(Binary),
    BitBinary(BitBinary),
    List(List),
    ImproperList(ImproperList),
    Tuple(Tuple),
    Map(Map),
}

Term.

Variants

Atom(Atom)FixInteger(FixInteger)BigInteger(BigInteger)Float(Float)Pid(Pid)Port(Port)Reference(Reference)ExternalFun(ExternalFun)InternalFun(InternalFun)Binary(Binary)BitBinary(BitBinary)List(List)ImproperList(ImproperList)Tuple(Tuple)Map(Map)

Methods

impl Term
[src]

fn decode<R: Read>(reader: R) -> DecodeResult

Decodes a term.

fn encode<W: Write>(&self, writer: W) -> EncodeResult

Encodes the term.

fn as_atom(&self) -> Option<&Atom>

Extracts the atom value if it is an atom term.

fn into_atom(self) -> Result<AtomTerm>

Converts the term to the atom value if it is an atom term.

fn as_fix_integer(&self) -> Option<&FixInteger>

Extracts the fix integer value if it is a fix integer term.

fn into_fix_integer(self) -> Result<FixIntegerTerm>

Converts the term to the fix integer value if it is a fix integer term.

fn as_big_integer(&self) -> Option<&BigInteger>

Extracts the big integer value if it is a big integer term.

fn into_big_integer(self) -> Result<BigIntegerTerm>

Converts the term to the big integer value if it is a big integer term.

fn as_float(&self) -> Option<&Float>

Extracts the float value if it is a float term.

fn into_float(self) -> Result<FloatTerm>

Converts the term to the float value if it is a float term.

fn as_pid(&self) -> Option<&Pid>

Extracts the pid value if it is a pid term.

fn into_pid(self) -> Result<PidTerm>

Converts the term to the pid value if it is a pid term.

fn as_port(&self) -> Option<&Port>

Extracts the port value if it is a port term.

fn into_port(self) -> Result<PortTerm>

Converts the term to the port value if it is a port term.

fn as_reference(&self) -> Option<&Reference>

Extracts the reference value if it is a reference term.

fn into_reference(self) -> Result<ReferenceTerm>

Converts the term to the reference value if it is a reference term.

fn as_external_fun(&self) -> Option<&ExternalFun>

Extracts the external functionif it is an external function term.

fn into_external_fun(self) -> Result<ExternalFunTerm>

Converts the term to the external function if it is an external function term.

fn as_internal_fun(&self) -> Option<&InternalFun>

Extracts the internal function if it is an internal function term.

fn into_internal_fun(self) -> Result<InternalFunTerm>

Converts the term to the internal function if it is an internal function term.

fn as_binary(&self) -> Option<&Binary>

Extracts the binary value if it is a binary term.

fn into_binary(self) -> Result<BinaryTerm>

Converts the term to the binary value if it is a binary term.

fn as_bit_binary(&self) -> Option<&BitBinary>

Extracts the bitstring value if it is a bitstring term.

fn into_bit_binary(self) -> Result<BitBinaryTerm>

Converts the term to the bitstring value if it is a bitstring term.

fn as_list(&self) -> Option<&List>

Extracts the list value if it is a list term.

fn into_list(self) -> Result<ListTerm>

Converts the term to the list value if it is a list term.

fn as_improper_list(&self) -> Option<&ImproperList>

Extracts the improper list value if it is an improper list term.

fn into_improper_list(self) -> Result<ImproperListTerm>

Converts the term to the improper list value if it is an improper list term.

fn as_tuple(&self) -> Option<&Tuple>

Extracts the tuple value if it is a tuple term.

fn into_tuple(self) -> Result<TupleTerm>

Converts the term to the tuple value if it is a tuple term.

fn as_map(&self) -> Option<&Map>

Extracts the map value if it is a map term.

fn into_map(self) -> Result<MapTerm>

Converts the term to the map value if it is a map term.

Trait Implementations

impl Clone for Term
[src]

fn clone(&self) -> Term

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 PartialEq for Term
[src]

fn eq(&self, __arg_0: &Term) -> bool

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

fn ne(&self, __arg_0: &Term) -> bool

This method tests for !=.

impl Debug for Term
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Display for Term
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl From<Atom> for Term
[src]

fn from(x: Atom) -> Self

Performs the conversion.

impl From<FixInteger> for Term
[src]

fn from(x: FixInteger) -> Self

Performs the conversion.

impl From<BigInteger> for Term
[src]

fn from(x: BigInteger) -> Self

Performs the conversion.

impl From<Float> for Term
[src]

fn from(x: Float) -> Self

Performs the conversion.

impl From<Pid> for Term
[src]

fn from(x: Pid) -> Self

Performs the conversion.

impl From<Port> for Term
[src]

fn from(x: Port) -> Self

Performs the conversion.

impl From<Reference> for Term
[src]

fn from(x: Reference) -> Self

Performs the conversion.

impl From<ExternalFun> for Term
[src]

fn from(x: ExternalFun) -> Self

Performs the conversion.

impl From<InternalFun> for Term
[src]

fn from(x: InternalFun) -> Self

Performs the conversion.

impl From<Binary> for Term
[src]

fn from(x: Binary) -> Self

Performs the conversion.

impl From<BitBinary> for Term
[src]

fn from(x: BitBinary) -> Self

Performs the conversion.

impl From<List> for Term
[src]

fn from(x: List) -> Self

Performs the conversion.

impl From<ImproperList> for Term
[src]

fn from(x: ImproperList) -> Self

Performs the conversion.

impl From<Tuple> for Term
[src]

fn from(x: Tuple) -> Self

Performs the conversion.

impl From<Map> for Term
[src]

fn from(x: Map) -> Self

Performs the conversion.