pub enum Error {
OutOfMemory,
OffsetOutOfBounds,
InvalidLayout,
RequestedOffsetUnaligned,
}
Expand description
An error that may occur during a copy or read operation.
Variants§
OutOfMemory
Copy or read would exceed the end of the allocation
OffsetOutOfBounds
Requested to copy to or read from an offset outside the bounds of the allocation
InvalidLayout
Computed invalid layout for copy operation, probably caused by incredibly large size, offset, or min-alignment parameters
RequestedOffsetUnaligned
The requested offset was unaligned. In a read operation, this means the provided offset into the buffer was not properly aligned for the requested type.
In an exact
variant copy function, the computed copy start offset did not match the requested start offset,
meaning the requested start offset was not properly aligned.
Trait Implementations§
source§impl Error for Error
Available on crate feature std
only.
impl Error for Error
Available on crate feature
std
only.1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<LayoutError> for Error
impl From<LayoutError> for Error
source§fn from(_err: LayoutError) -> Self
fn from(_err: LayoutError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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