#[non_exhaustive]pub enum InitError {
AlreadyInitialized,
Misaligned {
required: usize,
},
InvalidSpan,
InvalidUsable {
index: usize,
},
MetadataWontFit {
required_bytes: usize,
},
OverlapsRegion {
other: usize,
},
}Expand description
Structured failure reason for RegionInit::try_init.
These describe the checkable preconditions of initialisation. The remaining
unverifiable preconditions live in the # Safety contract instead.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AlreadyInitialized
init already completed successfully.
Misaligned
phys_base fails the implementation’s alignment requirement.
InvalidSpan
span_len is zero, not a base-frame multiple, or overflows the address space.
InvalidUsable
usable[index] is empty, misaligned, out of order, overlapping, or escapes
the span.
MetadataWontFit
No usable range is large enough to host the allocator’s metadata.
OverlapsRegion
(regioned only) span overlaps the already-initialised region other.
Trait Implementations§
impl Copy for InitError
impl Eq for InitError
impl StructuralPartialEq for InitError
Auto Trait Implementations§
impl Freeze for InitError
impl RefUnwindSafe for InitError
impl Send for InitError
impl Sync for InitError
impl Unpin for InitError
impl UnsafeUnpin for InitError
impl UnwindSafe for InitError
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