pub struct IOError {
pub inner: Rc<dyn IOErrorTrait>,
}
Expand description
A wrapper type for any IO implementation’s error type
To use the wrapper implement IOErrorTrait
on the error type to wrap. The
return types on the crate::IO
trait’s methods will give automatic
conversion via the ?
operator in a lot of cases, but in some cases it is
likely still needed to call .into()
to convert.
Fields§
§inner: Rc<dyn IOErrorTrait>
Implementations§
Source§impl IOError
impl IOError
Sourcepub fn downcast_ref<T: IOErrorTrait>(&self) -> Option<&T>
pub fn downcast_ref<T: IOErrorTrait>(&self) -> Option<&T>
Helper for downcasting into the internal error type
Due to how finnicky this is to get right, with coercing the Rc
Trait Implementations§
Source§impl<E: IOErrorTrait> From<E> for IOError
impl<E: IOErrorTrait> From<E> for IOError
Auto Trait Implementations§
impl Freeze for IOError
impl !RefUnwindSafe for IOError
impl !Send for IOError
impl !Sync for IOError
impl Unpin for IOError
impl !UnwindSafe for IOError
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