Expand description
Enum holding error information. Variants are defined for Stream::Token
and Stream::Range
as
well as string variants holding easy descriptions.
As there is implementations of From
for String
and &'static str
the
constructor need not be used directly as calling msg.into()
should turn a message into the
correct Info
variant.
Variants
Token(T)
Range(R)
Owned(String)
Static(&'static str)
Implementations
Trait Implementations
sourceimpl<T, R, F> From<Info<T, R, F>> for Info<T, R> where
F: Display,
impl<T, R, F> From<Info<T, R, F>> for Info<T, R> where
F: Display,
sourcefn from(info: PrimitiveInfo<T, R, F>) -> Self
fn from(info: PrimitiveInfo<T, R, F>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl<T, R> RefUnwindSafe for Info<T, R> where
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, R> Send for Info<T, R> where
R: Send,
T: Send,
impl<T, R> Sync for Info<T, R> where
R: Sync,
T: Sync,
impl<T, R> Unpin for Info<T, R> where
R: Unpin,
T: Unpin,
impl<T, R> UnwindSafe for Info<T, R> where
R: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more