Enum opaque_pointer::error::PointerError
pub enum PointerError {
Null,
Invalid,
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.
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)>
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
§fn eq(&self, other: &PointerError) -> bool
fn eq(&self, other: &PointerError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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