Enum sway_ast::token::CommentedTokenTree
source · pub enum CommentedTokenTree {
Comment(Comment),
Tree(CommentedTree),
}
Variants§
Comment(Comment)
Tree(CommentedTree)
Implementations§
source§impl CommentedTokenTree
impl CommentedTokenTree
pub fn strip_comments(self) -> Option<TokenTree>
Trait Implementations§
source§impl Clone for CommentedTokenTree
impl Clone for CommentedTokenTree
source§fn clone(&self) -> CommentedTokenTree
fn clone(&self) -> CommentedTokenTree
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CommentedTokenTree
impl Debug for CommentedTokenTree
source§impl From<Comment> for CommentedTokenTree
impl From<Comment> for CommentedTokenTree
source§impl From<GenericTokenTree<CommentedTokenStream>> for CommentedTokenTree
impl From<GenericTokenTree<CommentedTokenStream>> for CommentedTokenTree
source§fn from(tree: CommentedTree) -> Self
fn from(tree: CommentedTree) -> Self
Converts to this type from the input type.
source§impl Hash for CommentedTokenTree
impl Hash for CommentedTokenTree
source§impl PartialEq<CommentedTokenTree> for CommentedTokenTree
impl PartialEq<CommentedTokenTree> for CommentedTokenTree
source§fn eq(&self, other: &CommentedTokenTree) -> bool
fn eq(&self, other: &CommentedTokenTree) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<CommentedTokenTree> for CommentedTokenTree
impl PartialOrd<CommentedTokenTree> for CommentedTokenTree
source§fn partial_cmp(&self, other: &CommentedTokenTree) -> Option<Ordering>
fn partial_cmp(&self, other: &CommentedTokenTree) -> Option<Ordering>
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 CommentedTokenTree
impl StructuralEq for CommentedTokenTree
impl StructuralPartialEq for CommentedTokenTree
Auto Trait Implementations§
impl RefUnwindSafe for CommentedTokenTree
impl Send for CommentedTokenTree
impl Sync for CommentedTokenTree
impl Unpin for CommentedTokenTree
impl UnwindSafe for CommentedTokenTree
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
§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more