pub enum HandleError {
NullHandle,
InvalidHandle,
StaleVersion,
IndexPastEnd,
WrongMap,
}
Expand description
An error representing the ways a Handle
may be invalid.
Variants§
NullHandle
Identical to invalid handle, but has a slightly more helpful message for the most common case 0.
InvalidHandle
Returned from Handle::from_u64
if Handle::is_valid
fails.
StaleVersion
Returned from get/get_mut/delete if the handle is stale (this indicates something equivalent to a use-after-free / double-free, etc).
IndexPastEnd
Returned if the handle index references an index past the end of the HandleMap.
WrongMap
The handle has a map_id for a different map than the one it was attempted to be used with.
Trait Implementations§
Source§impl Clone for HandleError
impl Clone for HandleError
Source§fn clone(&self) -> HandleError
fn clone(&self) -> HandleError
Returns a duplicate of the value. Read more
1.0.0 · 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 HandleError
impl Debug for HandleError
Source§impl Display for HandleError
impl Display for HandleError
Source§impl Error for HandleError
impl Error for HandleError
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 From<HandleError> for ExternError
impl From<HandleError> for ExternError
Source§fn from(e: HandleError) -> Self
fn from(e: HandleError) -> Self
Converts to this type from the input type.
Source§impl Ord for HandleError
impl Ord for HandleError
Source§fn cmp(&self, other: &HandleError) -> Ordering
fn cmp(&self, other: &HandleError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for HandleError
impl PartialEq for HandleError
Source§impl PartialOrd for HandleError
impl PartialOrd for HandleError
impl Eq for HandleError
impl StructuralPartialEq for HandleError
Auto Trait Implementations§
impl Freeze for HandleError
impl RefUnwindSafe for HandleError
impl Send for HandleError
impl Sync for HandleError
impl Unpin for HandleError
impl UnwindSafe for HandleError
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