Struct Token

struct Token { ... }

A single token in a C expression.

Fields

kind: Kind

The type of this token.

raw: Box<[u8]>

The bytes that make up the token.

Implementations

impl Clone for Token

fn clone(self: &Self) -> Token

impl Debug for Token

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Eq for Token

impl Freeze for Token

impl PartialEq for Token

fn eq(self: &Self, other: &Token) -> bool

impl RefUnwindSafe for Token

impl Send for Token

impl StructuralPartialEq for Token

impl Sync for Token

impl Unpin for Token

impl UnwindSafe for Token

impl<'a> From for Token

fn from((kind, value): (Kind, &'a [u8])) -> Token

impl<T> Any for Token

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Token

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Token

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Token

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Token

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Token

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Token

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Token

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Token

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>