pub struct DiagSpan {
pub start: usize,
pub end: usize,
}Expand description
A byte range used to point at source text in a diagnostic
Every diagnostic has a severity, a short code (e.g. “E001”), and a message.
Below - mirrors Span in oxyl-lexer but lives here so that the diagnostics
stay independent of the lexer crate. Will keep the two types in sync
manually for now; will unify when the crate graph is refactored,
Fields§
§start: usize§end: usizeImplementations§
Trait Implementations§
impl Copy for DiagSpan
impl Eq for DiagSpan
impl StructuralPartialEq for DiagSpan
Auto Trait Implementations§
impl Freeze for DiagSpan
impl RefUnwindSafe for DiagSpan
impl Send for DiagSpan
impl Sync for DiagSpan
impl Unpin for DiagSpan
impl UnsafeUnpin for DiagSpan
impl UnwindSafe for DiagSpan
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