pub enum ReadError {
NotEnoughBytes {
missing: NonZeroU32,
},
Misaligned {
alignment: u32,
},
}Expand description
Error of a read with SharedAlignedBufferReader
Variants§
NotEnoughBytes
The contents end before the read does
Fields
§
missing: NonZeroU32How many more bytes the read needs.
Counted from the position of the reader, so it is not larger than the number of bytes
missing for the rest of the data, whose size the reader doesn’t know. Saturates at
u32::MAX, a read that needs more can’t succeed with any buffer.
Misaligned
Bytes at the position of the reader are not aligned in memory as the read requires
Trait Implementations§
impl Copy for ReadError
impl Eq for ReadError
Source§impl Error for ReadError
impl Error for ReadError
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()
impl StructuralPartialEq for ReadError
Auto Trait Implementations§
impl Forget for ReadError
impl Freeze for ReadError
impl Move for ReadError
impl RefUnwindSafe for ReadError
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl UnsafeUnpin for ReadErrorwhere
NonZeroU32Inner: UnsafeUnpin,
impl UnwindSafe for ReadError
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