pub struct Span<'a> {
pub text: Cow<'a, str>,
pub kind: SpanKind,
}Expand description
A Span is a piece of categorized text, based on the parsing done by
parse_input.
Fields§
§text: Cow<'a, str>The segment of text.
kind: SpanKindIts category.
Trait Implementations§
Source§impl<'a> Text<'a> for Span<'a>
impl<'a> Text<'a> for Span<'a>
Source§fn from_static_str(s: &'static str) -> Self
fn from_static_str(s: &'static str) -> Self
Turn a &’static str into Self, without any further knowledge about it. Read more
Source§fn from_static_spaces(s: &'static str) -> Self
fn from_static_spaces(s: &'static str) -> Self
We foten insert spaces as a static str. Read more
Source§fn comma_space() -> Self
fn comma_space() -> Self
A comma and space character Read more
impl<'a> Eq for Span<'a>
impl<'a> StructuralPartialEq for Span<'a>
Auto Trait Implementations§
impl<'a> Freeze for Span<'a>
impl<'a> RefUnwindSafe for Span<'a>
impl<'a> Send for Span<'a>
impl<'a> Sync for Span<'a>
impl<'a> Unpin for Span<'a>
impl<'a> UnsafeUnpin for Span<'a>
impl<'a> UnwindSafe for Span<'a>
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