pub struct Span { /* private fields */ }
Expand description
A region of source code.
Note that unlike proc_macro::Span
, this struct contains a reference to
the file containing it.
Implementations§
Trait Implementations§
Source§impl From<Span> for AngleBrackets
impl From<Span> for AngleBrackets
Source§impl From<Span> for DoubleQuotes
impl From<Span> for DoubleQuotes
Source§impl From<Span> for Parentheses
impl From<Span> for Parentheses
Source§impl From<Span> for SingleQuotes
impl From<Span> for SingleQuotes
Source§impl Ord for Span
impl Ord for Span
Source§impl PartialOrd for Span
impl PartialOrd for Span
Source§impl Span for Span
Available on crate feature ariadne
only.
impl Span for Span
Available on crate feature
ariadne
only.Source§type SourceId = String
type SourceId = String
The identifier used to uniquely refer to a source. In most cases, this is the fully-qualified path of the file.
Source§fn source(&self) -> &Self::SourceId
fn source(&self) -> &Self::SourceId
Get the identifier of the source that this span refers to.
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