pub struct Span {
pub input: String,
pub start: Position,
pub end: Position,
}Fields§
§input: String§start: Position§end: PositionImplementations§
Source§impl Span
impl Span
pub fn new<T: Display>( input: T, start: (usize, usize), end: (usize, usize), ) -> Span
pub fn input(&self) -> &str
pub fn with_input(&self, input: &str) -> Span
pub fn info(&self) -> Span
pub fn start(&self) -> (usize, usize)
pub fn end(&self) -> (usize, usize)
pub fn highlight_input(&self, indent: usize) -> String
Trait Implementations§
Source§impl Ord for Span
impl Ord for Span
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