Enum PointerError
pub enum PointerError {
Null,
Invalid,
InvalidType,
Utf8Error(Utf8Error),
TryReserveError(TryReserveError),
}
Expand description
Errors that can be detected by the functions of this crate.
Of course, invalid address can not be detected, then it’s unsafe yet.
Variants§
Null
Invalid
A pointer that was not previously lent to the FFI user.
InvalidType
A pointer previously lent but the type is not the same.
Utf8Error(Utf8Error)
Trying to convert to &str
a C string which content is not valid UTF-8.
TryReserveError(TryReserveError)
Trying to alloc memory, see [alloc::collections::TryReserveError
].
Trait Implementations§
§impl Debug for PointerError
impl Debug for PointerError
§impl Display for PointerError
impl Display for PointerError
§impl Error for PointerError
impl Error for PointerError
§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()
§impl From<TryReserveError> for PointerError
impl From<TryReserveError> for PointerError
§fn from(error: TryReserveError) -> Self
fn from(error: TryReserveError) -> Self
Converts to this type from the input type.
§impl From<Utf8Error> for PointerError
impl From<Utf8Error> for PointerError
§impl PartialEq for PointerError
impl PartialEq for PointerError
impl Eq for PointerError
impl StructuralPartialEq for PointerError
Auto Trait Implementations§
impl Freeze for PointerError
impl RefUnwindSafe for PointerError
impl Send for PointerError
impl Sync for PointerError
impl Unpin for PointerError
impl UnwindSafe for PointerError
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