#[non_exhaustive]pub enum ParseError {
NoTypeTree {
class_id: i32,
why: Option<NoTree>,
},
Read(ReadError),
CheckRead {
expected: u32,
parsed: Arc<Parsed>,
},
Tree(TreeError),
Provider(ProviderError),
Deref(DerefError),
}Expand description
Why reading an object failed: the L2 outcome other than success.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoTypeTree
No tree for the class: UnityPy raises the exception why names
(its TPK’s; review round 11: nothing told them apart).
Fields
Read(ReadError)
The reader failed; no value.
CheckRead
The read finished but did not end at byte_size. The value rides
along: it is what parse_as_dict(check_read=False) returns. Shared,
not copied, when the error is cloned (a published result is handed to
every caller), and still charged to its input while any copy lives.
Tree(TreeError)
The object’s tree did not compile.
Provider(ProviderError)
A provider failed.
Deref(DerefError)
The MonoBehaviour script hook’s dereference of m_Script failed
with anything but a null pointer, which UnityPy raises
(files/ObjectReader.py:332-350; crate::env::Environment::object_tree).
Carried by value so reporting a failed dereference allocates nothing.
Implementations§
Source§impl ParseError
impl ParseError
Sourcepub fn l2_kind(&self) -> L2Kind
pub fn l2_kind(&self) -> L2Kind
The canonical dump’s kind for this outcome. A read that ended before
its start (a negative bytes_read, the pure-Python reader’s after a
negative TypelessData length) is other: the oracle reads the count
from the message with (\d+), which takes no sign
(tools/parity/dump_records.py error_kind; plan 3.10).
Trait Implementations§
Source§impl CellError for ParseError
impl CellError for ParseError
Source§fn work_refused(limit: LimitError) -> Self
fn work_refused(limit: LimitError) -> Self
A Limits bound, so kind other (R16).
Source§fn is_transient(&self) -> bool
fn is_transient(&self) -> bool
crate::LimitKind::InputMemory), an I/O failure, a
provider’s failure. Such an error is returned, never published.Source§fn is_meter_refusal(&self) -> bool
fn is_meter_refusal(&self) -> bool
crate::LimitKind::InputMemory), and not the budget, I/O or a
provider: what a computation that ends in it was granted counts as
its open’s work (module docs).Source§fn heap_bytes(&self) -> u64
fn heap_bytes(&self) -> u64
crate::limits::heap_cost of each Arc
and string it holds, counted whether or not a string shares a file’s
buffer), charged to the input’s meter while a cell keeps it. A clone
shares that heap and allocates nothing.Source§impl Clone for ParseError
impl Clone for ParseError
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
impl Eq for ParseError
Source§impl Error for ParseError
impl Error for ParseError
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()