Struct Repr

#[repr(transparent)]
pub(in ::io::error) struct Repr(pub(in ::io::error::repr) NonNull<()>, pub(in ::io::error::repr) PhantomData<ErrorData<CustomOwner>>);

The internal representation.

See the module docs for more, this is just a way to hack in a check that we indeed are not unwind-safe.

fn is_unwind_safe<T: core::panic::UnwindSafe>() {}
is_unwind_safe::<std::io::Error>();

Fields

0: NonNull<()>
1: PhantomData<ErrorData<CustomOwner>>

Implementations

impl Repr

fn new_custom(b: CustomOwner) -> Self
fn new_os(code: RawOsError) -> Self
fn new_simple(kind: ErrorKind) -> Self
const fn new_simple_message(m: &'static SimpleMessage) -> Self
fn data(&self) -> ErrorData<&Custom>
fn data_mut(&mut self) -> ErrorData<&mut Custom>
fn into_data(self) -> ErrorData<CustomOwner>

Trait Implementations

impl Debug for Repr

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

impl Drop for Repr

fn drop(&mut self)

impl Send for Repr

impl Sync for Repr

Auto Trait Implementations

impl !RefUnwindSafe for Repr

impl !UnwindSafe for Repr

impl Freeze for Repr

impl Unpin for Repr

impl UnsafeUnpin for Repr

Blanket Implementations

impl<T> Any for Repr where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Repr where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Repr where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for Repr

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for Repr where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for Repr

impl<T, U> Into<U> for Repr where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Repr where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for Repr where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>