pub struct Span {
pub start: u32,
pub end: u32,
}Expand description
A byte range into the query text.
Half open, so start is the first byte and end is one past the last, which is what slicing
wants and what every editor protocol in existence expects. Byte offsets rather than character
offsets because that is what the parser has and converting is the caller’s problem, once, at
the point where a human is going to read it.
Fields§
§start: u32First byte of the span.
end: u32One past the last byte of the span.
Implementations§
Trait Implementations§
impl Copy for Span
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 UnsafeUnpin 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