pub struct TokenLike<'a, TY> {
pub ty: TY,
pub source: &'a str,
pub span: Span,
}Fields§
§ty: TY§source: &'a str§span: SpanImplementations§
Trait Implementations§
Source§impl From<&TokenLike<'_, TokenType<InternedString>>> for SyntaxObject
impl From<&TokenLike<'_, TokenType<InternedString>>> for SyntaxObject
Source§fn from(val: &Token<'_, InternedString>) -> SyntaxObject
fn from(val: &Token<'_, InternedString>) -> SyntaxObject
Converts to this type from the input type.
Source§impl From<TokenLike<'_, TokenError>> for ParseError
impl From<TokenLike<'_, TokenError>> for ParseError
Source§fn from(value: TokenLike<'_, TokenError>) -> Self
fn from(value: TokenLike<'_, TokenError>) -> Self
Converts to this type from the input type.
impl<'a, TY> StructuralPartialEq for TokenLike<'a, TY>
Auto Trait Implementations§
impl<'a, TY> Freeze for TokenLike<'a, TY>where
TY: Freeze,
impl<'a, TY> RefUnwindSafe for TokenLike<'a, TY>where
TY: RefUnwindSafe,
impl<'a, TY> Send for TokenLike<'a, TY>where
TY: Send,
impl<'a, TY> Sync for TokenLike<'a, TY>where
TY: Sync,
impl<'a, TY> Unpin for TokenLike<'a, TY>where
TY: Unpin,
impl<'a, TY> UnsafeUnpin for TokenLike<'a, TY>where
TY: UnsafeUnpin,
impl<'a, TY> UnwindSafe for TokenLike<'a, TY>where
TY: UnwindSafe,
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> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more