pub struct CoordinateRangeError { /* private fields */ }Expand description
Error returned when a source coordinate is outside a LineIndex.
Implementations§
Source§impl CoordinateRangeError
impl CoordinateRangeError
Sourcepub const fn line(&self) -> LineNumber
pub const fn line(&self) -> LineNumber
Requested 1-based line number.
Sourcepub const fn byte_column(&self) -> ByteColumn
pub const fn byte_column(&self) -> ByteColumn
Requested 1-based byte column.
Sourcepub const fn source_line_count(&self) -> LineNumber
pub const fn source_line_count(&self) -> LineNumber
Number of lines known to the LineIndex.
Sourcepub const fn max_byte_column(&self) -> Option<ByteColumn>
pub const fn max_byte_column(&self) -> Option<ByteColumn>
Last valid 1-based byte column on the requested line, when the line exists.
Sourcepub const fn kind(&self) -> CoordinateRangeErrorKind
pub const fn kind(&self) -> CoordinateRangeErrorKind
Specific reason coordinate resolution failed.
Trait Implementations§
Source§impl Clone for CoordinateRangeError
impl Clone for CoordinateRangeError
Source§fn clone(&self) -> CoordinateRangeError
fn clone(&self) -> CoordinateRangeError
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 CoordinateRangeError
impl Debug for CoordinateRangeError
Source§impl Display for CoordinateRangeError
impl Display for CoordinateRangeError
impl Eq for CoordinateRangeError
Source§impl Error for CoordinateRangeError
impl Error for CoordinateRangeError
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 CoordinateRangeError
impl PartialEq for CoordinateRangeError
Source§fn eq(&self, other: &CoordinateRangeError) -> bool
fn eq(&self, other: &CoordinateRangeError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CoordinateRangeError
Auto Trait Implementations§
impl Freeze for CoordinateRangeError
impl RefUnwindSafe for CoordinateRangeError
impl Send for CoordinateRangeError
impl Sync for CoordinateRangeError
impl Unpin for CoordinateRangeError
impl UnsafeUnpin for CoordinateRangeError
impl UnwindSafe for CoordinateRangeError
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