pub struct Parent {
pub name: RawStr,
pub kind: ParentKind,
pub depth: u32,
pub pinned: u64,
}Expand description
What a child knows of its container. A file loaded at top level has none
(parent: None): UnityPy makes the Environment that loaded it its
parent (environment.py:154), which is the container PPtr.deref scans
(plan section 3.13, rule 4). The input’s meter travels separately, as
every file’s File::meter, top-level ones included.
Fields§
§name: RawStrThe container’s name.
kind: ParentKindThe container’s kind.
depth: u32How deep the child is: 1 for an entry of a top-level container. A
container at crate::limits::Limits::max_container_depth refuses to
parse an entry that is itself a container (LimitKind::ContainerDepth).
pinned: u64The length of the buffer the child’s bytes are a slice of, which any
slice of them keeps alive: the container’s decoded run that holds
them, or, for stored blocks, the buffer of the container’s own bytes
(its own pinned). Never less than the child’s own length, which is
what a container that does not know it gives. A value read from the
child copies its slices out when they would keep much more than
themselves alive (crate::pin; plan section 8, R3).