pub struct Span<F = FileId> {
pub root: F,
pub start: usize,
pub end: usize,
}Fields§
§root: F§start: usize§end: usizeImplementations§
Source§impl Span<Root>
impl Span<Root>
pub fn of_token(syntax_token: &SyntaxToken) -> Self
pub fn of_node(syntax_node: &SyntaxNode) -> Self
pub fn of_lustre_str(string_node: &Str) -> Self
Sourcepub fn after(self) -> Self
pub fn after(self) -> Self
Returns a 0-long span located just after another span, useful for reported missing syntax
Sourcepub fn extend(&mut self, other: impl IntoIterator<Item = Self>)
pub fn extend(&mut self, other: impl IntoIterator<Item = Self>)
Extends the span using other spans, effectively keeping the lowest start bound and the
highest end bound
Trait Implementations§
impl<F: Eq> Eq for Span<F>
impl<F> StructuralPartialEq for Span<F>
Auto Trait Implementations§
impl<F> Freeze for Span<F>where
F: Freeze,
impl<F> RefUnwindSafe for Span<F>where
F: RefUnwindSafe,
impl<F> Send for Span<F>where
F: Send,
impl<F> Sync for Span<F>where
F: Sync,
impl<F> Unpin for Span<F>where
F: Unpin,
impl<F> UnwindSafe for Span<F>where
F: 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