Enum erg_common::error::Location
source · [−]pub enum Location {
RangePair {
ln_first: (usize, usize),
col_first: (usize, usize),
ln_second: (usize, usize),
col_second: (usize, usize),
},
Range {
ln_begin: usize,
col_begin: usize,
ln_end: usize,
col_end: usize,
},
LineRange(usize, usize),
Line(usize),
Unknown,
}
Expand description
points the location (of an error) in a code
Variants
RangePair
Fields
Range
LineRange(usize, usize)
Line(usize)
Unknown
Implementations
sourceimpl Location
impl Location
pub fn concat<L: Locational, R: Locational>(l: &L, r: &R) -> Self
pub const fn range(
ln_begin: usize,
col_begin: usize,
ln_end: usize,
col_end: usize
) -> Self
pub fn pair(lhs: Self, rhs: Self) -> Self
pub const fn ln_begin(&self) -> Option<usize>
pub const fn ln_end(&self) -> Option<usize>
pub const fn col_begin(&self) -> Option<usize>
pub const fn col_end(&self) -> Option<usize>
Trait Implementations
impl Copy for Location
impl Eq for Location
impl StructuralEq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more