Struct litcheck_core::diagnostics::Span
source · pub struct Span<T> { /* private fields */ }
Expand description
Represents the source span of an item of type [T]
Implementations§
source§impl<T> Span<T>
impl<T> Span<T>
sourcepub fn at(offset: usize, spanned: T) -> Self
pub fn at(offset: usize, spanned: T) -> Self
Create a span for spanned
representing a single location, offset
pub fn map<U, F>(self, f: F) -> Span<U>where
F: FnMut(T) -> U,
pub fn into_parts(self) -> (SourceSpan, T)
pub fn into_inner(self) -> T
Trait Implementations§
source§impl<T: Ord> Ord for Span<T>
impl<T: Ord> Ord for Span<T>
source§impl<T: PartialEq> PartialEq for Span<T>
impl<T: PartialEq> PartialEq for Span<T>
source§impl<T: PartialOrd> PartialOrd for Span<T>
impl<T: PartialOrd> PartialOrd for Span<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for Span<T>
impl<T: Eq> Eq for Span<T>
Auto Trait Implementations§
impl<T> Freeze for Span<T>where
T: Freeze,
impl<T> RefUnwindSafe for Span<T>where
T: RefUnwindSafe,
impl<T> Send for Span<T>where
T: Send,
impl<T> Sync for Span<T>where
T: Sync,
impl<T> Unpin for Span<T>where
T: Unpin,
impl<T> UnwindSafe for Span<T>where
T: UnwindSafe,
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