pub enum RawTerm {
Show 25 variants
SmallInt(u8),
Int(i32),
SmallTuple(Vec<RawTerm>),
LargeTuple(Vec<RawTerm>),
Map(Vec<(RawTerm, RawTerm)>),
Nil,
String(Vec<u8>),
List(Vec<RawTerm>),
Improper(Box<RawTerm>),
Binary(Vec<u8>),
BitBinary {
binary: Vec<u8>,
bit: u8,
bits: u8,
},
SmallBigInt(BigInt),
LargeBigInt(BigInt),
Pid {
node: Box<RawTerm>,
id: u32,
serial: u32,
creation: u8,
},
NewPid {
node: Box<RawTerm>,
id: u32,
serial: u32,
creation: u32,
},
Port {
node: Box<RawTerm>,
id: u32,
creation: u8,
},
NewPort {
node: Box<RawTerm>,
id: u32,
creation: u32,
},
Ref {
node: Box<RawTerm>,
id: Vec<u32>,
creation: u8,
},
NewerRef {
node: Box<RawTerm>,
id: Vec<u32>,
creation: u32,
},
Function {
size: u32,
arity: u8,
uniq: [u8; 16],
index: u32,
module: Box<RawTerm>,
old_index: Box<RawTerm>,
old_uniq: Box<RawTerm>,
pid: Box<RawTerm>,
free_var: Vec<RawTerm>,
},
Float(OrderedFloat<f64>),
Atom(String),
SmallAtom(String),
AtomDeprecated(String),
SmallAtomDeprecated(String),
}Expand description
Erlang Term Format types
Variants§
SmallInt(u8)
Int(i32)
SmallTuple(Vec<RawTerm>)
LargeTuple(Vec<RawTerm>)
Map(Vec<(RawTerm, RawTerm)>)
Nil
String(Vec<u8>)
List(Vec<RawTerm>)
Improper(Box<RawTerm>)
Binary(Vec<u8>)
BitBinary
SmallBigInt(BigInt)
LargeBigInt(BigInt)
Pid
NewPid
Port
NewPort
Ref
NewerRef
Function
Fields
Float(OrderedFloat<f64>)
Atom(String)
SmallAtom(String)
AtomDeprecated(String)
SmallAtomDeprecated(String)
Implementations§
Source§impl RawTerm
impl RawTerm
pub fn from_bytes(input: &[u8]) -> Result<RawTerm, NomErr<Error<&[u8]>>>
pub fn to_bytes(self) -> Vec<u8> ⓘ
pub fn as_type(&self) -> RawTermType
pub fn as_general_type(&self) -> RawTermGeneralType
pub fn is_atom(&self) -> bool
pub fn is_string(&self) -> bool
Sourcepub fn is_string_like(&self) -> bool
pub fn is_string_like(&self) -> bool
if term is a string/binary or atom
pub fn is_integer(&self) -> bool
pub fn is_atom_pair(&self) -> bool
pub fn is_string_map(&self) -> bool
pub fn is_list(&self) -> bool
pub fn as_atom(self) -> Option<String>
pub fn as_string(self) -> Option<String>
pub fn as_string_like(self) -> Option<String>
pub fn as_atom_pair(self) -> Option<(String, RawTerm)>
Trait Implementations§
Source§impl<'_enum> From<&'_enum RawTerm> for RawTermType
impl<'_enum> From<&'_enum RawTerm> for RawTermType
Source§fn from(val: &'_enum RawTerm) -> RawTermType
fn from(val: &'_enum RawTerm) -> RawTermType
Converts to this type from the input type.
Source§impl From<RawTerm> for RawTermType
impl From<RawTerm> for RawTermType
Source§fn from(val: RawTerm) -> RawTermType
fn from(val: RawTerm) -> RawTermType
Converts to this type from the input type.
Source§impl Ord for RawTerm
impl Ord for RawTerm
Source§impl PartialOrd for RawTerm
impl PartialOrd for RawTerm
impl Eq for RawTerm
impl StructuralPartialEq for RawTerm
Auto Trait Implementations§
impl Freeze for RawTerm
impl RefUnwindSafe for RawTerm
impl Send for RawTerm
impl Sync for RawTerm
impl Unpin for RawTerm
impl UnwindSafe for RawTerm
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