pub struct HelperRefusal { /* private fields */ }Expand description
How one helper body was not read: which grammar was reading, what it established, and the token.
Shared by every helper grammar this home declares. The TYPE a refusal travels in is the grammar’s own, because a diagnostic’s family tag is a fact about the type and two helper readings of one declaration must never derive one related identity.
Implementations§
Source§impl HelperRefusal
impl HelperRefusal
Sourcepub const fn class(&self) -> RefusalClass
pub const fn class(&self) -> RefusalClass
Which class of refusal the summary line opens with.
Sourcepub const fn classified(&self) -> Observed
pub const fn classified(&self) -> Observed
How what was observed differs from the grammar that was expected.
Sourcepub fn first(&self) -> String
pub fn first(&self) -> String
The established refusal, stated in full, naming the helper the author wrote.
Sourcepub fn canonical_bytes(&self) -> Vec<u8> ⓘ
pub fn canonical_bytes(&self) -> Vec<u8> ⓘ
This refusal’s canonical bytes: which reading refused, the helper it was reading, and that reading’s own material.
The reading rides ahead of the material, so a malformed clause and a doubled role can never derive one related identity inside one family.
Source§impl HelperRefusal
impl HelperRefusal
Sourcepub const fn grammar_refused(
grammar: Grammar,
cause: CaptureCause,
at: SpanHandle,
) -> Self
pub const fn grammar_refused( grammar: Grammar, cause: CaptureCause, at: SpanHandle, ) -> Self
One refusal established by the grammar’s own reading, at the token the clause sits at.
Sourcepub const fn vocabulary_refused(
grammar: Grammar,
refusal: DeclarationError,
at: SpanHandle,
) -> Self
pub const fn vocabulary_refused( grammar: Grammar, refusal: DeclarationError, at: SpanHandle, ) -> Self
One refusal the vocabulary established over a value the grammar read, at that value’s own token.
Sourcepub const fn capture_refused(
grammar: Grammar,
issue: CaptureIssue,
at: SpanHandle,
) -> Self
pub const fn capture_refused( grammar: Grammar, issue: CaptureIssue, at: SpanHandle, ) -> Self
One refusal from a shared descriptor reading, retained under the issue’s own authority.
Sourcepub const fn issue(&self) -> CaptureIssue
pub const fn issue(&self) -> CaptureIssue
Which of the two readings refused, and its own answer.
Sourcepub const fn at(&self) -> SpanHandle
pub const fn at(&self) -> SpanHandle
The token the refusal was established at.
Trait Implementations§
Source§impl Clone for HelperRefusal
impl Clone for HelperRefusal
Source§fn clone(&self) -> HelperRefusal
fn clone(&self) -> HelperRefusal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for HelperRefusal
Source§impl Debug for HelperRefusal
impl Debug for HelperRefusal
Source§impl Display for HelperRefusal
impl Display for HelperRefusal
impl Eq for HelperRefusal
Source§impl Error for HelperRefusal
impl Error for HelperRefusal
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()