pub enum Kind {
Special,
Int,
UInt,
Float,
Sequence,
Map,
Symbol,
Bytes,
}
Expand description
The type of an atom.
Variants§
Special
A value with a special meaning.
Int
A signed integer. Argument is the byte length, minus one. The following bytes are the value, stored in little endian.
UInt
An unsigned integer. Argument is the byte length, minus one. The following bytes are the value, stored in little endian.
Float
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
A list of atoms. Argument is the count of atoms in the sequence.
Map
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
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
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.