[−][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.
Sources 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 (dyn Error + 'static)) -> Self[src]
Capture an error source from a standard error.
This method is only available when the std feature is enabled.
pub fn get(&self) -> &(dyn Error + 'static)[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 + 'static)> for Source<'a>[src]
impl<'a> Value for Source<'a>[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Source<'a>[src]
impl<'a> !Send for Source<'a>[src]
impl<'a> !Sync for Source<'a>[src]
impl<'a> Unpin for Source<'a>[src]
impl<'a> !UnwindSafe for Source<'a>[src]
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,
pub 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.
pub 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>,