pub struct TextSpan {
pub start: usize,
pub end: usize,
}Expand description
This struct holds a span within a region of text from start to end.
The start index may be greater than the end index (swapping start and end will represent the same span)
The lower index is inclusive and the higher index is exclusive.
An empty span or cursor position is specified with start == end.
Fields§
§start: usizeThe start of the span (inclusive)
end: usizeThe end of the span (exclusive)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextSpan
impl RefUnwindSafe for TextSpan
impl Send for TextSpan
impl Sync for TextSpan
impl Unpin for TextSpan
impl UnwindSafe for TextSpan
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