Struct shrimple_parser::utils::Location
source · pub struct Location {
pub line: NonZeroU32,
pub col: u32,
}Expand description
Location of the error. Useful for error reporting, and used by crate::FullParsingError
Fields§
§line: NonZeroU32Source code line of the location
col: u32Source code column of the location.
Implementations§
source§impl Location
impl Location
sourcepub const fn with_path(self, path: &Path) -> FullLocation<'_>
pub const fn with_path(self, path: &Path) -> FullLocation<'_>
Turn a Location into a FullLocation by providing the file path.
Trait Implementations§
source§impl Ord for Location
impl Ord for Location
source§impl PartialEq for Location
impl PartialEq for Location
source§impl PartialOrd for Location
impl PartialOrd for Location
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for Location
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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