Struct python_ast::token::Tk
[−]
[src]
pub struct Tk<'a> { id: Id, bytes: &'a [u8], tag: Tag, }
Fields
id: Id
bytes: &'a [u8]
tag: Tag
Methods
impl<'a> Tk<'a>
[src]
const fn const_(id: Id, bytes: &'static [u8], tag: Tag) -> Tk
Alternative constructor for const Tk definitions so there is not a need to make the struct fields public just to declare a const Tk in another module.
fn bytes(&self) -> &[u8]
fn id(&self) -> Id
fn tag(&self) -> Tag
fn as_string(&self) -> String
Trait Implementations
impl<'a> Debug for Tk<'a>
[src]
impl<'a> Clone for Tk<'a>
[src]
fn clone(&self) -> Tk<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'a> Copy for Tk<'a>
[src]
impl<'a> Eq for Tk<'a>
[src]
impl<'a> PartialEq for Tk<'a>
[src]
fn eq(&self, __arg_0: &Tk<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Tk<'a>) -> bool
This method tests for !=
.
impl<'a> PartialOrd for Tk<'a>
[src]
fn partial_cmp(&self, __arg_0: &Tk<'a>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Tk<'a>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Tk<'a>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Tk<'a>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Tk<'a>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'a> Ord for Tk<'a>
[src]
fn cmp(&self, __arg_0: &Tk<'a>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl<'a, 'b> FindToken<&'b [Id]> for Tk<'a>
[src]
fn find_token(&self, input: &[Id]) -> bool
impl<'a> Default for Tk<'a>
[src]
impl<'a> New<'a> for Tk<'a>
[src]
impl<'a> AsChar for &'a Tk<'a>
[src]
fn as_char(self) -> char
makes a char from self
fn is_alpha(self) -> bool
tests that self is an alphabetic character Read more
fn is_alphanum(self) -> bool
tests that self is an alphabetic character or a decimal digit Read more
fn is_dec_digit(self) -> bool
tests that self is a decimal digit
fn is_hex_digit(self) -> bool
tests that self is an hex digit
fn is_oct_digit(self) -> bool
tests that self is an octal digit