pub struct TreeCase {
pub flags: u8,
pub start: i8,
pub rows: Vec<Row>,
pub refs: Vec<RefType>,
pub data: Vec<u8>,
}Expand description
A tree, the ref types it may reach, and the bytes of one value.
Layout: flags (a byte of TreeCase’s bits), start (an i8), the
rows, the count of ref types (a byte) and each ref type, then the value’s
bytes, which run to the end. Rows are a u16 count (little-endian) and
each row’s level (a byte), meta flag (an i32, little-endian), type and
name; a string is a byte of length and its bytes. A ref type is its
class, namespace and assembly, a byte whose low bit says a tree follows,
and that tree’s rows.
Fields§
§flags: u8The bits below.
start: i8Where the pure-Python reader starts, from the start of the data.
rows: Vec<Row>The value’s tree.
refs: Vec<RefType>The file’s ref types, in order.
data: Vec<u8>The value’s bytes.
Implementations§
Source§impl TreeCase
impl TreeCase
Sourcepub const BIG_ENDIAN: u8 = 1
pub const BIG_ENDIAN: u8 = 1
The data is big-endian.
Sourcepub const REFS_ABSENT: u8 = 2
pub const REFS_ABSENT: u8 = 2
The file has no ref_types (format below 20), whatever refs holds.
Sourcepub const REFS_NO_FILE: u8 = 4
pub const REFS_NO_FILE: u8 = 4
There is no file at all, whatever refs holds (wins over
Self::REFS_ABSENT).
Sourcepub const STREAM: u8 = 8
pub const STREAM: u8 = 8
The pure-Python reader reads by the stream reader’s rules (a file loaded from a path).
Sourcepub const PYTHON: u8 = 32
pub const PYTHON: u8 = 32
write_after_read reads with the pure-Python reader, not
UnityPyBoost’s.
Sourcepub const SMALL_MEMORY: u8 = 64
pub const SMALL_MEMORY: u8 = 64
The run bounds memory at the fuzz crate’s small bound
(SMALL_MEMORY in fuzz/src/lib.rs), which a read of many small
values reaches before the work bound, not at the large one, which
no value read reaches. Without it the code that grows a charged
buffer at the memory bound never runs in the value targets.
Sourcepub const BYTES_IO: u8 = 128
pub const BYTES_IO: u8 = 128
With Self::STREAM, the stream reader is backed by io.BytesIO,
where a negative read size reads to the end.