pub struct Location {
pub begin: Position,
pub end: Position,
}Fields§
§begin: Position§end: PositionImplementations§
Source§impl Location
impl Location
pub const fn zero() -> Self
pub const fn new(begin: Position, end: Position) -> Self
pub const fn from_length(begin: Position, length: u32) -> Self
pub const fn spanning(begin: Location, end: Location) -> Self
pub fn encloses(self, location: Location) -> bool
pub fn overlaps(self, location: Location) -> bool
pub fn contains(self, position: Position) -> bool
pub fn contains_closed(self, position: Position) -> bool
pub fn extend(&mut self, other: Location)
pub fn shift(&mut self, start: Position, old_end: Position, new_end: Position)
Trait Implementations§
impl 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 UnsafeUnpin 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