pub struct TokenList {
pub tokens: Vec<Token>,
pub stress: Option<Stress>,
}Expand description
A tokenized word with stress marked.
Fields§
§tokens: Vec<Token>The tokens of this word.
stress: Option<Stress>The stress of this word.
Implementations§
Source§impl TokenList
impl TokenList
Sourcepub fn stream(&self) -> TokenStream<'_>
pub fn stream(&self) -> TokenStream<'_>
Streams self as TokenStream, a structure more suitable for parsing than a plain
TokenList.
Sourcepub fn append<T: IntoTokens>(&mut self, item: &T, flags: IntoTokensFlags)
pub fn append<T: IntoTokens>(&mut self, item: &T, flags: IntoTokensFlags)
Appends an item as tokens to self.
Sourcepub fn set_stress(&mut self, stress: Stress)
pub fn set_stress(&mut self, stress: Stress)
Modifies the stress of self.
Trait Implementations§
Source§impl Ord for TokenList
impl Ord for TokenList
Source§impl PartialOrd for TokenList
impl PartialOrd for TokenList
impl Eq for TokenList
impl StructuralPartialEq for TokenList
Auto Trait Implementations§
impl Freeze for TokenList
impl RefUnwindSafe for TokenList
impl Send for TokenList
impl Sync for TokenList
impl Unpin for TokenList
impl UnwindSafe for TokenList
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