Skip to main content

Module stack

Module stack 

Source
Expand description

A non-allocating alternative to Vec, used to track the state of an EPEE decoder.

This is only possible due to bounding the depth of objects we decode, which we are able to do with complete correctness due to EPEE defining a maximum depth of just 100. This limit is also sufficiently small as to make this not only feasible yet performant, with the stack taking less than a kibibyte (even on 64-bit platforms).

This code is internal to monero-epee yet is still written not to panic in any case.

Structsยง

PackedTypes ๐Ÿ”’
An array of TypeOrEntry, using u4 for each value.
Stack ๐Ÿ”’
A non-allocating Vec.

Constantsยง

EPEE_LIB_MAX_OBJECT_DEPTH ๐Ÿ”’
MAX_OBJECT_DEPTH ๐Ÿ”’