#[non_exhaustive]pub enum DerefError {
Null,
FileIdPastEnd {
file_id: i32,
},
FileIdBelowStart {
file_id: i32,
},
NotFound {
path: RawStr,
},
RawTarget {
name: RawStr,
},
MissingObject {
file: RawStr,
path_id: i64,
},
ContainerDropped {
name: RawStr,
},
Load(Error),
}Expand description
Why a dereference failed, with the exception UnityPy raises.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Null
ValueError: m_PathID == 0.
FileIdPastEnd
FileNotFoundError: m_FileID - 1 >= len(externals).
FileIdBelowStart
IndexError: m_FileID - 1 < -len(externals).
NotFound
FileNotFoundError: no sibling, CAB or resolver hit.
RawTarget
AttributeError: the target is a raw file, or a container under an
Environment files key, neither of which has objects.
MissingObject
KeyError: no such object in the target.
ContainerDropped
The pointer’s file is a bundle entry whose bundle has been dropped, so its siblings cannot be scanned (rule 4; UnityPy cannot reach this: a caller that hands out a file keeps its bundle).
Fields
§
name: RawStrThe bundle’s name (crate::files::Parent::name).
Load(Error)
Loading the target failed.
Trait Implementations§
Source§impl Clone for DerefError
impl Clone for DerefError
Source§impl Debug for DerefError
impl Debug for DerefError
Source§impl Display for DerefError
impl Display for DerefError
impl Eq for DerefError
Source§impl Error for DerefError
impl Error for DerefError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<AllocError> for DerefError
impl From<AllocError> for DerefError
Source§fn from(error: AllocError) -> Self
fn from(error: AllocError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for DerefError
impl From<Error> for DerefError
Source§impl PartialEq for DerefError
impl PartialEq for DerefError
impl StructuralPartialEq for DerefError
Auto Trait Implementations§
impl !Freeze for DerefError
impl !RefUnwindSafe for DerefError
impl !UnwindSafe for DerefError
impl Forget for DerefError
impl Move for DerefError
impl Send for DerefError
impl Sync for DerefError
impl Unpin for DerefError
impl UnsafeUnpin for DerefError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more