Enum winnow::error::StrContext
source · #[non_exhaustive]pub enum StrContext {
Label(&'static str),
Expected(StrContextValue),
}
Expand description
Additional parse context for ContextError
added via Parser::context
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Label(&'static str)
Description of what is currently being parsed
Expected(StrContextValue)
Grammar item that was expected
Trait Implementations§
source§impl Clone for StrContext
impl Clone for StrContext
source§fn clone(&self) -> StrContext
fn clone(&self) -> StrContext
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StrContext
impl Debug for StrContext
source§impl Display for StrContext
impl Display for StrContext
source§impl PartialEq for StrContext
impl PartialEq for StrContext
source§fn eq(&self, other: &StrContext) -> bool
fn eq(&self, other: &StrContext) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for StrContext
impl StructuralPartialEq for StrContext
Auto Trait Implementations§
impl RefUnwindSafe for StrContext
impl Send for StrContext
impl Sync for StrContext
impl Unpin for StrContext
impl UnwindSafe for StrContext
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