[−][src]Enum rust_eterm::terms::DistHeaderTag
Variants
The tag for a normal unfragmented and uncompressed distribution header.
Binary representation
| 1 byte | 1 byte | NumberOfAtomCacheRefs/2+1 \| 0 bytes | N \| 0 bytes |
|---|---|---|---|
68 | NumberOfAtomCacheRefs | Flags | AtomCacheRefs |
-
NumberOfAtomCacheRefsis the amount of atom cache references in this message. -
Flagsis a list of 4-byte values containig flags in the following format:1 bit 3 bits NewCacheEntrySegmentIndexNewCacheEntrydescribes whether the atom is new in the cache.SegmentIndexdescribes in which segment the atom is located.
and after the flags for each of the references, one entry of this is sent:
3 bits 1 bit Unused LongAtomsLongAtomsstates whether 1 or 2 bytes are used for the atom values in this distribution header.
-
AtomCacheRefsare:When for this atom,
NewCacheEntryis 1:1 byte 1|2 bytes LengthbytesInternalSegmentIndexLengthAtomTextInternalSegmentIndex, together withSegmentIndexin the flags entry completely define the location of the atom in the atom cache.Lengthis either 1 byte whenLongAtomsis 0, and 2 bytes otherwise. It describes how many bytes long theAtomTextis.AtomTextis the actual name of the atom.
Or when for this atom,
NewCacheEntryis 0:1 byte InternalSegmentIndexInternalSegmentIndex, together withSegmentIndexin the flags entry completely define the location of the atom in the atom cache.
This header is then trailed with a term_to_binary-encoded term with (optionally) atom references to this header.
The tag for a header stating that the message is fragmented.
Note: This header must contain the entire atom cache.
Binary representation
| 1 byte | 8 bytes | 8 bytes | 1 byte | NumberOfAtomCacheRefs/2+1 \| 0 bytes | N \| 0 bytes |
|---|---|---|---|---|---|
69 | SequenceId | FragmentId | NumberOfAtomCacheRefs | Flags | AtomCacheRefs |
SequenceIduniquely identifies the message that this fragment is part of.FragmentIdis a number that decreases with 1 for each fragment, and at N, where N is the number of fragments (so the last fragment hasFragmentIdof1).NumberOfAtomCacheRefs,Flags, andAtomCacheRefsact just like inNormal.
Some data MAY then be sent after this header, and each packet after this MUST only contain data of the term that is being sent.
The tag denoting a follow-up fragment of apreviously fragment message (either another fragment, or the first fragment).
Binary representation
| 1 byte | 8 bytes | 8 bytes |
|---|---|---|
70 | SequenceId | FragmentId |
SequenceId, just like inFragmenteduniquely identifies this message, and must be the same as in the associatedDIST_HDR_FRAG_CONT's.FragmentId, just like inFragmentedis a number that decreases with 1 for each fragment, with the last fragment having aFragmentIdof 1.
The tag denoting a compressed value (either a distribution header or an encoded atom).
Binary representation
| 1 byte | 4 bytes | N |
|---|---|---|
80 | UncompressedSize | ZLibCompressedData |
-
UncompressedSizeis the complete size of the uncompressedZLibCompressedData(including the tag). -
ZLibCompressedDatacompresses data of the shape:1 byte N bytes TagData
Auto Trait Implementations
impl RefUnwindSafe for DistHeaderTag
impl Send for DistHeaderTag
impl Sync for DistHeaderTag
impl Unpin for DistHeaderTag
impl UnwindSafe for DistHeaderTag
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,