pub struct TextReadRefusal {
pub cause: TextReadCause,
pub at: u64,
}Expand description
One refused text read: the established cause, and the byte it sits at.
Fields§
§cause: TextReadCauseThe established cause.
at: u64The byte position the cause was established at.
Implementations§
Source§impl TextReadRefusal
impl TextReadRefusal
Sourcepub const fn coordinate(self) -> SourceCoordinate
pub const fn coordinate(self) -> SourceCoordinate
Where this refusal sits, as a typed coordinate in the byte role.
The text route reads bytes, so every cause it establishes has a byte position and is born carrying it.
Stating it in the shape SpanTable::coordinate_of answers in lets a caller report a read that never produced a capture — and therefore never produced a span table or a handle to look up in one.
§Nonclaims
No table is consulted, because at this point there is none: the position is the refusal’s own, and the role says which text it counts into.
Source§impl TextReadRefusal
impl TextReadRefusal
Sourcepub fn diagnostic(&self, door: &Door) -> Diagnostic
pub fn diagnostic(&self, door: &Door) -> Diagnostic
Project this refused text read at the byte coordinate it established.
No caller supplies a coordinate or a phase on this road, so a pre-capture diagnostic cannot be paired with a different byte, semantic-origin coordinate, or refusal vocabulary.
Trait Implementations§
Source§impl Clone for TextReadRefusal
impl Clone for TextReadRefusal
Source§fn clone(&self) -> TextReadRefusal
fn clone(&self) -> TextReadRefusal
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 TextReadRefusal
Source§impl Debug for TextReadRefusal
impl Debug for TextReadRefusal
Source§impl Display for TextReadRefusal
impl Display for TextReadRefusal
impl Eq for TextReadRefusal
Source§impl Error for TextReadRefusal
impl Error for TextReadRefusal
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()