Enum solang_parser::pt::Loc
source · [−]Expand description
file no, start offset, end offset (in bytes)
Variants
Builtin
CommandLine
Implicit
Codegen
File(usize, usize, usize)
Implementations
sourceimpl Loc
impl Loc
pub fn begin_range(&self) -> Self
pub fn end_range(&self) -> Self
pub fn file_no(&self) -> usize
sourcepub fn try_file_no(&self) -> Option<usize>
pub fn try_file_no(&self) -> Option<usize>
Return the file_no if the location is in a file
pub fn start(&self) -> usize
pub fn end(&self) -> usize
pub fn use_end_from(&mut self, other: &Loc)
pub fn use_start_from(&mut self, other: &Loc)
Trait Implementations
sourceimpl Ord for Loc
impl Ord for Loc
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Loc> for Loc
impl PartialOrd<Loc> for Loc
sourcefn partial_cmp(&self, other: &Loc) -> Option<Ordering>
fn partial_cmp(&self, other: &Loc) -> Option<Ordering>
1.0.0 · sourcefn 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 Loc
impl Eq for Loc
impl StructuralEq for Loc
impl StructuralPartialEq for Loc
Auto Trait Implementations
impl RefUnwindSafe for Loc
impl Send for Loc
impl Sync for Loc
impl Unpin for Loc
impl UnwindSafe for Loc
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