#[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
impl Eq for StrContext
impl StructuralPartialEq for StrContext
Auto Trait Implementations§
impl Freeze for StrContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Label
: 24 bytesExpected
: 24 bytes