pub struct Position { /* private fields */ }
Implementations§
source§impl Position
impl Position
pub const fn new() -> Self
pub const fn from_range(start_offset: i32, end_offset: i32) -> Self
pub const fn valid(self) -> bool
pub fn line(&self, source: &str) -> i32
pub const fn start_offset(self) -> i32
pub const fn end_offset(self) -> i32
sourcepub fn range_through(self, end: Self) -> Self
pub fn range_through(self, end: Self) -> Self
Returns the position from this through, and including the entirety of, end.
Trait Implementations§
source§impl PartialEq for Position
impl PartialEq for Position
source§impl PartialOrd for Position
impl PartialOrd for Position
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 Position
impl Eq for Position
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
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