Enum fuchsia_inspect::Error
source · pub enum Error {
Show 28 variants
Fidl(String),
AllocateVmo(Status),
VmoSize(Status),
Free {
value_type: &'static str,
index: BlockIndex,
error: Box<Error>,
},
Create {
value_type: &'static str,
error: Box<Error>,
},
NoOp(&'static str),
CreateHeap(Box<Error>),
CreateState(Box<Error>),
BlockAlreadyFree(BlockIndex),
InvalidIndex(BlockIndex, &'static str),
HeapMaxSizeReached,
BlockSizeTooBig(usize),
InvalidBlockType(BlockIndex, BlockType),
InvalidBlockTypeNumber(BlockIndex, u8),
UnexpectedBlockType(BlockType, BlockType),
UnexpectedBlockTypeRepr(&'static str, BlockType),
ExpectedLockState(bool),
InvalidBlockOrder(usize),
InvalidBlockOrderAtIndex(u8, BlockIndex),
InvalidBlockSwap,
InvalidArrayType(BlockIndex),
ArrayCapacityExceeded {
slots: usize,
order: u8,
max_capacity: usize,
},
InvalidFlags {
value_type: &'static str,
flags: u8,
index: BlockIndex,
},
NameNotUtf8,
FailedToConvertArraySlotsToUsize,
VmoFormat(Error),
AdoptionIntoWrongVmo,
AdoptAncestor,
}
Expand description
Errors that Inspect API functions can return.
Variants§
Fidl(String)
AllocateVmo(Status)
VmoSize(Status)
Free
Create
NoOp(&'static str)
CreateHeap(Box<Error>)
CreateState(Box<Error>)
BlockAlreadyFree(BlockIndex)
InvalidIndex(BlockIndex, &'static str)
HeapMaxSizeReached
BlockSizeTooBig(usize)
InvalidBlockType(BlockIndex, BlockType)
InvalidBlockTypeNumber(BlockIndex, u8)
UnexpectedBlockType(BlockType, BlockType)
UnexpectedBlockTypeRepr(&'static str, BlockType)
ExpectedLockState(bool)
InvalidBlockOrder(usize)
InvalidBlockOrderAtIndex(u8, BlockIndex)
InvalidBlockSwap
InvalidArrayType(BlockIndex)
ArrayCapacityExceeded
InvalidFlags
NameNotUtf8
FailedToConvertArraySlotsToUsize
VmoFormat(Error)
AdoptionIntoWrongVmo
AdoptAncestor
Implementations§
source§impl Error
impl Error
pub fn fidl(err: Error) -> Self
pub fn free(value_type: &'static str, index: BlockIndex, error: Error) -> Self
pub fn create(value_type: &'static str, error: Error) -> Self
pub fn invalid_index(index: BlockIndex, reason: &'static str) -> Self
pub fn invalid_flags( value_type: &'static str, flags: u8, index: BlockIndex, ) -> Self
pub fn array_capacity_exceeded( slots: usize, order: u8, max_capacity: usize, ) -> Self
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)