pub enum SectionViewError {
ZeroSizedType,
LengthNotMultipleOfSize {
length: usize,
elem_size: usize,
},
AlignmentMismatch {
ptr_addr: usize,
required: usize,
},
}Expand description
Error returned when borrowing a section payload as a typed slice fails.
§Performance
perf: unspecified; errors are returned only from typed-view paths.
Variants§
ZeroSizedType
The requested element type is zero-sized, so it cannot tile a payload.
LengthNotMultipleOfSize
Payload byte length is not an exact multiple of size_of::<T>().
Fields
AlignmentMismatch
Payload base address does not satisfy align_of::<T>().
Trait Implementations§
Source§impl Clone for SectionViewError
impl Clone for SectionViewError
Source§fn clone(&self) -> SectionViewError
fn clone(&self) -> SectionViewError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SectionViewError
impl Debug for SectionViewError
Source§impl Display for SectionViewError
impl Display for SectionViewError
Source§impl Error for SectionViewError
impl Error for SectionViewError
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 PartialEq for SectionViewError
impl PartialEq for SectionViewError
Source§fn eq(&self, other: &SectionViewError) -> bool
fn eq(&self, other: &SectionViewError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SectionViewError
impl Eq for SectionViewError
impl StructuralPartialEq for SectionViewError
Auto Trait Implementations§
impl Freeze for SectionViewError
impl RefUnwindSafe for SectionViewError
impl Send for SectionViewError
impl Sync for SectionViewError
impl Unpin for SectionViewError
impl UnsafeUnpin for SectionViewError
impl UnwindSafe for SectionViewError
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