pub enum ChunkData<'a> {
Tag(Tag),
WhiteSpace(Cow<'a, str>),
Word(Cow<'a, str>),
}Available on crate feature
unstable only.Variants§
Implementations§
Source§impl<'a> ChunkData<'a>
impl<'a> ChunkData<'a>
pub fn is_tag(&self) -> bool
pub fn is_tag_and<F>(&self, f: F) -> bool
pub fn is_word(&self) -> bool
pub fn is_ws(&self) -> bool
pub fn tag(&self) -> Option<&Tag>
pub fn word(&self) -> Option<&Cow<'a, str>>
pub fn ws(&self) -> Option<&Cow<'a, str>>
pub fn tag_mut(&mut self) -> Option<&mut Tag>
Trait Implementations§
impl<'a> Eq for ChunkData<'a>
Source§impl<'a> PartialEq for ChunkData<'a>
impl<'a> PartialEq for ChunkData<'a>
impl<'a> StructuralPartialEq for ChunkData<'a>
Auto Trait Implementations§
impl<'a> Freeze for ChunkData<'a>
impl<'a> RefUnwindSafe for ChunkData<'a>
impl<'a> Send for ChunkData<'a>
impl<'a> Sync for ChunkData<'a>
impl<'a> Unpin for ChunkData<'a>
impl<'a> UnsafeUnpin for ChunkData<'a>
impl<'a> UnwindSafe for ChunkData<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more