pub struct Phrase<'a>(pub Vec<PhraseToken<'a>>);Tuple Fields§
§0: Vec<PhraseToken<'a>>Implementations§
Trait Implementations§
Source§impl<'a> ContainsUtf8 for Phrase<'a>
impl<'a> ContainsUtf8 for Phrase<'a>
fn contains_utf8(&self) -> bool
Source§impl<'a, 'b> From<&'b [&'a str]> for Phrase<'a>
impl<'a, 'b> From<&'b [&'a str]> for Phrase<'a>
Source§fn from(words: &'b [&'a str]) -> Self
fn from(words: &'b [&'a str]) -> Self
A phrase represents a sequence of space-separated words. This builds a phrase from a list of such words.
Note: due to constraints of the phrase syntax, consecutive non-ascii
words passed to from are joined together (separated with a space) into
a single “phrase word”.
Guarantee: Phrase::from(words).data().join(" ") == words.join(" ")
Source§impl<'a> IntoBoundedStatic for Phrase<'a>
impl<'a> IntoBoundedStatic for Phrase<'a>
impl<'a> StructuralPartialEq for Phrase<'a>
Source§impl<'a> ToBoundedStatic for Phrase<'a>
impl<'a> ToBoundedStatic for Phrase<'a>
Auto Trait Implementations§
impl<'a> Freeze for Phrase<'a>
impl<'a> RefUnwindSafe for Phrase<'a>
impl<'a> Send for Phrase<'a>
impl<'a> Sync for Phrase<'a>
impl<'a> Unpin for Phrase<'a>
impl<'a> UnsafeUnpin for Phrase<'a>
impl<'a> UnwindSafe for Phrase<'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