pub struct Token {
pub kind: Kind,
pub text: SmolStr,
/* private fields */
}Expand description
A token
Fields§
§kind: KindThe Kind of this token
text: SmolStrThe token text
Implementations§
Trait Implementations§
source§impl From<Token> for NodeOrToken
impl From<Token> for NodeOrToken
source§fn from(src: Token) -> NodeOrToken
fn from(src: Token) -> NodeOrToken
Converts to this type from the input type.
source§impl Ord for Token
impl Ord for Token
source§impl PartialEq<Token> for Token
impl PartialEq<Token> for Token
source§impl PartialOrd<Token> for Token
impl PartialOrd<Token> for Token
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Token
impl StructuralEq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl !RefUnwindSafe for Token
impl Send for Token
impl !Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere U: FromObjRef<T>,
source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.