pub enum AlignSpecError {
BadTypeWidth(AlignedTypeWidthError),
AlignPref(Align, Align),
AbiAlignTooLarge(Align),
Parse(String),
ParseAlign(AlignError),
BadInt(ParseIntError),
BadAddressSpace(AddressSpaceError),
}
Expand description
Errors that can occur when constructing a TypeAlignSpec
or PointerAlignSpec
.
Variants§
BadTypeWidth(AlignedTypeWidthError)
The underlying type being specified has a bad width.
AlignPref(Align, Align)
The supplied preferred alignment isn’t greater than or equal to the ABI minimum
AbiAlignTooLarge(Align)
The supplied ABI alignment is too large.
Parse(String)
We’re parsing this alignment spec from a string, and it’s malformed in some way.
ParseAlign(AlignError)
We’re parsing this alignment spec from a string, and one of its inner alignments is malformed in some way.
BadInt(ParseIntError)
We’re parsing this alignment spec from a string, and one of its fields can’t be converted into an integer.
BadAddressSpace(AddressSpaceError)
The supplied address space is invalid.
Trait Implementations§
Source§impl Debug for AlignSpecError
impl Debug for AlignSpecError
Source§impl Display for AlignSpecError
impl Display for AlignSpecError
Source§impl Error for AlignSpecError
impl Error for AlignSpecError
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<AddressSpaceError> for AlignSpecError
impl From<AddressSpaceError> for AlignSpecError
Source§fn from(source: AddressSpaceError) -> Self
fn from(source: AddressSpaceError) -> Self
Converts to this type from the input type.
Source§impl From<AlignError> for AlignSpecError
impl From<AlignError> for AlignSpecError
Source§fn from(source: AlignError) -> Self
fn from(source: AlignError) -> Self
Converts to this type from the input type.
Source§impl From<AlignedTypeWidthError> for AlignSpecError
impl From<AlignedTypeWidthError> for AlignSpecError
Source§fn from(source: AlignedTypeWidthError) -> Self
fn from(source: AlignedTypeWidthError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for AlignSpecError
impl From<ParseIntError> for AlignSpecError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AlignSpecError
impl RefUnwindSafe for AlignSpecError
impl Send for AlignSpecError
impl Sync for AlignSpecError
impl Unpin for AlignSpecError
impl UnwindSafe for AlignSpecError
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