Enum sway_ast::token::GenericTokenTree
source · [−]pub enum GenericTokenTree<T> {
Punct(Punct),
Ident(Ident),
Group(GenericGroup<T>),
Literal(Literal),
DocComment(DocComment),
}
Expand description
Allows for generalizing over commented and uncommented token streams.
Variants
Punct(Punct)
Ident(Ident)
Group(GenericGroup<T>)
Literal(Literal)
DocComment(DocComment)
Trait Implementations
sourceimpl<T: Clone> Clone for GenericTokenTree<T>
impl<T: Clone> Clone for GenericTokenTree<T>
sourcefn clone(&self) -> GenericTokenTree<T>
fn clone(&self) -> GenericTokenTree<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T: Debug> Debug for GenericTokenTree<T>
impl<T: Debug> Debug for GenericTokenTree<T>
sourceimpl<T> From<DocComment> for GenericTokenTree<T>
impl<T> From<DocComment> for GenericTokenTree<T>
sourcefn from(doc_comment: DocComment) -> Self
fn from(doc_comment: DocComment) -> Self
Converts to this type from the input type.
sourceimpl<T> From<GenericGroup<T>> for GenericTokenTree<T>
impl<T> From<GenericGroup<T>> for GenericTokenTree<T>
sourcefn from(group: GenericGroup<T>) -> Self
fn from(group: GenericGroup<T>) -> Self
Converts to this type from the input type.
sourceimpl From<GenericTokenTree<CommentedTokenStream>> for CommentedTokenTree
impl From<GenericTokenTree<CommentedTokenStream>> for CommentedTokenTree
sourcefn from(tree: CommentedTree) -> Self
fn from(tree: CommentedTree) -> Self
Converts to this type from the input type.
sourceimpl<T> From<Ident> for GenericTokenTree<T>
impl<T> From<Ident> for GenericTokenTree<T>
sourceimpl<T> From<Literal> for GenericTokenTree<T>
impl<T> From<Literal> for GenericTokenTree<T>
sourceimpl<T> From<Punct> for GenericTokenTree<T>
impl<T> From<Punct> for GenericTokenTree<T>
sourceimpl<T: Hash> Hash for GenericTokenTree<T>
impl<T: Hash> Hash for GenericTokenTree<T>
sourceimpl<T: PartialEq> PartialEq<GenericTokenTree<T>> for GenericTokenTree<T>
impl<T: PartialEq> PartialEq<GenericTokenTree<T>> for GenericTokenTree<T>
sourcefn eq(&self, other: &GenericTokenTree<T>) -> bool
fn eq(&self, other: &GenericTokenTree<T>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl<T: PartialOrd> PartialOrd<GenericTokenTree<T>> for GenericTokenTree<T>
impl<T: PartialOrd> PartialOrd<GenericTokenTree<T>> for GenericTokenTree<T>
sourcefn partial_cmp(&self, other: &GenericTokenTree<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &GenericTokenTree<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl<T: Eq> Eq for GenericTokenTree<T>
impl<T> StructuralEq for GenericTokenTree<T>
impl<T> StructuralPartialEq for GenericTokenTree<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for GenericTokenTree<T> where
T: RefUnwindSafe,
impl<T> Send for GenericTokenTree<T> where
T: Send,
impl<T> Sync for GenericTokenTree<T> where
T: Sync,
impl<T> Unpin for GenericTokenTree<T> where
T: Unpin,
impl<T> UnwindSafe for GenericTokenTree<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more