pub struct Span {
pub start: usize,
pub end: usize,
pub col: usize,
pub row: usize,
}Fields§
§start: usize§end: usize§col: usize§row: usizeImplementations§
Source§impl Span
impl Span
pub const fn new(start: usize, end: usize) -> Self
pub const fn with_counter(start: usize, counter: usize) -> Self
pub const fn gap(&self) -> usize
pub const fn extend(&self, other: Span) -> Self
pub const fn collapse(self, size: usize) -> Self
pub const fn shrink_left(self, size: usize) -> Self
pub const fn shrink_right(self, size: usize) -> Self
pub const fn expand_left(self, size: usize) -> Self
pub const fn expand_right(self, size: usize) -> Self
Trait Implementations§
Source§impl PartialOrd for Span
impl PartialOrd for Span
impl Eq for Span
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnwindSafe for Span
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