Struct Custom
#[repr(align(4))]
pub struct Custom { pub(in ::io::error) kind: ErrorKind, pub(in ::io::error) error: NonNull<dyn Error + Send + Sync>, pub(in ::io::error) error_drop: unsafe fn(NonNull<dyn Error + Send + Sync>), pub(in ::io::error) outer_drop: unsafe fn(NonNull<Self>) }
A user-created allocated error.
Fields
kind: ErrorKinderror: NonNull<dyn Error + Send + Sync>Box<dyn Error + ...>withoutalloc.error_drop: unsafe fn(NonNull<dyn Error + Send + Sync>)outer_drop: unsafe fn(NonNull<Self>)Call to drop a pointer to
Custom.
Implementations
impl Custom
unsafe fn from_raw(kind: ErrorKind, error: NonNull<dyn Error + Send + Sync>, error_drop: unsafe fn(NonNull<dyn Error + Send + Sync>), outer_drop: unsafe fn(NonNull<Self>)) -> CustomSafety
errormust be valid for up to a static lifetime, and own its pointee.error_dropmust be safe to call for the pointererrorexactly once.outer_dropmust be safe to call on a pointer to this instance ofCustom(the pointer is likely stored within aCustomOwner).
fn into_raw(self) -> NonNull<dyn Error + Send + Sync>fn error_ref(&self) -> &dyn Error + Send + Sync + 'staticfn error_mut(&mut self) -> &mut dyn Error + Send + Sync + 'static
Trait Implementations
impl Debug for Custom
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Drop for Custom
fn drop(&mut self)