#[non_exhaustive]pub enum ReadDetail {
Show 13 variants
Eof {
need: u64,
exception: &'static str,
},
BoostEof {
method: &'static str,
need: u64,
exception: &'static str,
},
NegativeLength(i64),
ArrayChildren,
PairChildren,
NoRefTypes {
reader: ReadBy,
absent: bool,
},
RefTypeNotFound,
RefTypeNoTree,
Python(&'static str),
Stream(StreamRefusal),
Limit(LimitError),
Charge(ChargeError),
Tree(TreeError),
}Expand description
What a reader failure was.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Eof
A read needed bytes past the end.
Fields
BoostEof
UnityPyBoost’s failed read, retaining the function whose public exception class and message apply.
Fields
NegativeLength(i64)
A negative length.
ArrayChildren
Boost’s ValueError for an Array node without two children.
PairChildren
Boost’s ValueError for a pair node without two children.
NoRefTypes
ReferencedObject data with no ref_types to resolve it.
Fields
RefTypeNotFound
ReferencedObject data whose (class, ns, asm) is not in ref_types.
RefTypeNoTree
The pure-Python reader’s array path only: an aligned ReferencedObject
element whose class is empty or whose matched ref type has no tree
(type trees disabled) calls read_value(None, ...), an AttributeError
(kind other). UnityPyBoost and the pure-Python scalar path skip
data instead, as for an empty class (plan R14).
Python(&'static str)
A Python exception category, sometimes followed by its diagnostic:
malformed-child IndexError, aligned-array TypeError, attribute
access failures, or an unpack format’s struct.error.
Stream(StreamRefusal)
The stream reader’s refusal (a file loaded from a path): a negative
or huge byte_start, or a TypelessData length below -1 on the
pure-Python path (kind other).
Limit(LimitError)
A bound from Limits on work or depth.
Charge(ChargeError)
The input’s meter or the budget refused the value’s memory.
Tree(TreeError)
A ref type’s tree did not compile.
Trait Implementations§
Source§impl Clone for ReadDetail
impl Clone for ReadDetail
Source§impl Debug for ReadDetail
impl Debug for ReadDetail
Source§impl Display for ReadDetail
impl Display for ReadDetail
impl Eq for ReadDetail
Source§impl Error for ReadDetail
impl Error for ReadDetail
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()