[−][src]Struct sval::stream::Source
A streamable error.
This type shouldn't be confused with sval::Error
, which is
used to communicate errors back to callers.
The purpose of the Source
type is to let streams serialize
error types, that may have backtraces and other metadata.
Source
s can only be created when the std
feature is available,
but streams can still work with them by formatting them or passing
them along even in no-std environments where the Error
trait isn't available.
Implementations
impl<'a> Source<'a>
[src]
pub fn new(err: &'a impl Error) -> Self
[src]
Capture an error source from a standard error.
This method is only available when the std
feature is enabled.
pub fn get<'b>(&'b self) -> impl Error + 'b
[src]
Get the inner error.
Trait Implementations
impl<'a> AsRef<dyn Error + 'static> for Source<'a>
[src]
impl<'a> Debug for Source<'a>
[src]
impl<'a> Display for Source<'a>
[src]
impl<'a> From<&'a (dyn Error + 'a)> for Source<'a>
[src]
impl<'a> Value for Source<'a>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Source<'a>
impl<'a> !Send for Source<'a>
impl<'a> !Sync for Source<'a>
impl<'a> Unpin for Source<'a>
impl<'a> !UnwindSafe for Source<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,