Struct Span
pub struct Span { pub start_line: usize, pub start_col: usize, pub end_line: usize, pub end_col: usize, pub range: Range<usize> }
The position of a node in the template source
Fields
start_line: usizeLine the span starts on, 1-based
start_col: usizeColumn the span starts on, 0-based
end_line: usizeLine the span ends on, 1-based
end_col: usizeColumn the span ends on, 0-based
range: Range<usize>Byte range of the span in the template source
Trait Implementations
impl Clone for Span
fn clone(&self) -> Span
impl Debug for Span
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for Span
fn default() -> Span
impl Display for Span
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Span
impl PartialEq for Span
fn eq(&self, other: &Span) -> bool
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 UnsafeUnpin for Span
impl UnwindSafe for Span
Blanket Implementations
impl<T> Any for Span
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Span
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Span
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Span
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Span
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Span
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for Span
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for Span
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Span
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Span
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>