pub enum StreamRefusal {
NegativePosition,
PositionTooLarge,
NegativeRead,
ReadTooLarge,
ReadSizeOverflow,
}Expand description
An exception the stream reader raises where the memory reader reads on (module docs). Its text is UnityPy’s message.
Variants§
NegativePosition
Position = p with p < 0 (ValueError).
PositionTooLarge
Position = p with p >= 2^63: the file’s seek takes a C offset
(ValueError).
NegativeRead
read(n) with n < -1 (ValueError).
ReadTooLarge
read(n) with 2^63 - 33 <= n < 2^63: the bytes object n needs
(OverflowError).
ReadSizeOverflow
read(n) with n >= 2^63: a C size (OverflowError).
Implementations§
Trait Implementations§
Source§impl Clone for StreamRefusal
impl Clone for StreamRefusal
impl Copy for StreamRefusal
Source§impl Debug for StreamRefusal
impl Debug for StreamRefusal
Source§impl Display for StreamRefusal
impl Display for StreamRefusal
impl Eq for StreamRefusal
Source§impl Error for StreamRefusal
impl Error for StreamRefusal
1.30.0 · 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<StreamRefusal> for Error
impl From<StreamRefusal> for Error
Source§fn from(e: StreamRefusal) -> Self
fn from(e: StreamRefusal) -> Self
Converts to this type from the input type.
Source§impl Hash for StreamRefusal
impl Hash for StreamRefusal
Source§impl PartialEq for StreamRefusal
impl PartialEq for StreamRefusal
impl StructuralPartialEq for StreamRefusal
Auto Trait Implementations§
impl Forget for StreamRefusal
impl Freeze for StreamRefusal
impl Move for StreamRefusal
impl RefUnwindSafe for StreamRefusal
impl Send for StreamRefusal
impl Sync for StreamRefusal
impl Unpin for StreamRefusal
impl UnsafeUnpin for StreamRefusal
impl UnwindSafe for StreamRefusal
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