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<StrContext> for StrContext
impl PartialEq<StrContext> 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 ==
.