pub struct ParserSpanToTextRangeError { /* private fields */ }Expand description
Error returned when a parser span cannot be converted to a TextRange.
Implementations§
Source§impl ParserSpanToTextRangeError
impl ParserSpanToTextRangeError
Sourcepub const fn source_len_bytes(&self) -> ByteOffset
pub const fn source_len_bytes(&self) -> ByteOffset
Length of the source string the span was checked against.
Sourcepub const fn span_start(&self) -> ByteOffset
pub const fn span_start(&self) -> ByteOffset
Inclusive start byte offset from the parser span.
Sourcepub const fn span_end(&self) -> ByteOffset
pub const fn span_end(&self) -> ByteOffset
Exclusive end byte offset from the parser span.
Sourcepub const fn kind(&self) -> ParserSpanToTextRangeErrorKind
pub const fn kind(&self) -> ParserSpanToTextRangeErrorKind
Specific reason the conversion failed.
Trait Implementations§
Source§impl Clone for ParserSpanToTextRangeError
impl Clone for ParserSpanToTextRangeError
Source§fn clone(&self) -> ParserSpanToTextRangeError
fn clone(&self) -> ParserSpanToTextRangeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ParserSpanToTextRangeError
impl Debug for ParserSpanToTextRangeError
Source§impl Display for ParserSpanToTextRangeError
impl Display for ParserSpanToTextRangeError
impl Eq for ParserSpanToTextRangeError
Source§impl Error for ParserSpanToTextRangeError
impl Error for ParserSpanToTextRangeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ParserSpanToTextRangeError
impl PartialEq for ParserSpanToTextRangeError
Source§fn eq(&self, other: &ParserSpanToTextRangeError) -> bool
fn eq(&self, other: &ParserSpanToTextRangeError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ParserSpanToTextRangeError
Auto Trait Implementations§
impl Freeze for ParserSpanToTextRangeError
impl RefUnwindSafe for ParserSpanToTextRangeError
impl Send for ParserSpanToTextRangeError
impl Sync for ParserSpanToTextRangeError
impl Unpin for ParserSpanToTextRangeError
impl UnsafeUnpin for ParserSpanToTextRangeError
impl UnwindSafe for ParserSpanToTextRangeError
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