pub enum Kind {
Special = 0,
Int = 1,
UInt = 2,
Float = 3,
Sequence = 4,
Map = 5,
Symbol = 6,
Bytes = 7,
}
Expand description
The type of an atom.
Variants§
Special = 0
A value with a special meaning.
Int = 1
A signed integer. Argument is the byte length, minus one. The following bytes are the value, stored in little endian.
UInt = 2
An unsigned integer. Argument is the byte length, minus one. The following bytes are the value, stored in little endian.
Float = 3
A floating point value. Argument is the byte length, minus one. Must be either 4 or 8 bytes. The following bytes are the value, stored in little endian.
Sequence = 4
A list of atoms. Argument is the count of atoms in the sequence.
Map = 5
A list of key-value pairs. Argument is the count of entries in the map. There will be twice as many total atoms, since each entry is a key/value pair.
Symbol = 6
A symbol. If the least-significant bit of the arg is 0, this is a new symbol. The remaining bits of the arg contain the length in bytes. The following bytes will contain the symbol bytes (UTF-8). It should be stored and given a unique symbol id, starting at 0.
If the least-significant bit of the arg is 1, the remaining bits are the symbol id of a previously emitted symbol.
Bytes = 7
A series of bytes. The argument is the length. The bytes follow.
Implementations§
Trait Implementations§
impl Copy for Kind
impl Eq for Kind
impl StructuralEq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§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
§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
key
and return true
if they are equal.