pub struct InvalidAlign(pub usize);Expand description
The error SizeClasses::try_class_for returns when align is not a
power of two (the core::alloc::Layout contract
SizeClasses::class_for assumes but – on its own hot path – only
debug_assert!s). Carries the offending value for diagnostics.
A plain tuple struct, not #[non_exhaustive]: match the offending value
directly as Err(InvalidAlign(n)).
Tuple Fields§
§0: usizeTrait Implementations§
Source§impl Clone for InvalidAlign
impl Clone for InvalidAlign
Source§fn clone(&self) -> InvalidAlign
fn clone(&self) -> InvalidAlign
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 moreimpl Copy for InvalidAlign
Source§impl Debug for InvalidAlign
impl Debug for InvalidAlign
Source§impl Display for InvalidAlign
impl Display for InvalidAlign
impl Eq for InvalidAlign
Source§impl Error for InvalidAlign
impl Error for InvalidAlign
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 InvalidAlign
impl PartialEq for InvalidAlign
impl StructuralPartialEq for InvalidAlign
Auto Trait Implementations§
impl Freeze for InvalidAlign
impl RefUnwindSafe for InvalidAlign
impl Send for InvalidAlign
impl Sync for InvalidAlign
impl Unpin for InvalidAlign
impl UnsafeUnpin for InvalidAlign
impl UnwindSafe for InvalidAlign
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