pub struct Span {
pub start: usize,
pub end: usize,
}
Expand description
Represents a span of characters in the source code.
A Span
contains the starting and ending indices of a span of characters in the
source code. The start
field represents the index of the first character in the
span, while the end
field represents the index of the last character in the span.
Fields§
§start: usize
§end: usize
Implementations§
Trait Implementations§
Source§impl Serialize for Span
Implements the Serialize
trait for the Span
struct.
impl Serialize for Span
Implements the Serialize
trait for the Span
struct.
This allows the Span
struct to be serialized into a JSON object.
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 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