pub struct ViaStd;Expand description
Wrapper for converting std::error::Error to BoxedError2.
Use with .context() to wrap standard library or third-party errors.
§Example
use std::fs;
use error2::prelude::*;
fn read_file() -> Result<String, BoxedError2> {
fs::read_to_string("file.txt").context(ViaStd)
}Auto Trait Implementations§
impl Freeze for ViaStd
impl RefUnwindSafe for ViaStd
impl Send for ViaStd
impl Sync for ViaStd
impl Unpin for ViaStd
impl UnwindSafe for ViaStd
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