pub struct Underscore { /* private fields */ }Expand description
The Rust punctuation token _.
Implementations§
Source§impl Underscore
impl Underscore
pub const TEXT: &'static str = "_"
pub fn new(span: Span) -> Self
pub fn span(&self) -> Span
pub fn set_span(&mut self, span: Span)
pub fn spacing(&self) -> Spacing
pub fn set_spacing(&mut self, spacing: Spacing)
pub fn with_spacing(self, spacing: Spacing) -> Self
pub fn as_str(&self) -> &'static str
pub fn to_token_tree(&self) -> TokenTree
pub fn into_token_tree(self) -> TokenTree
Trait Implementations§
Source§impl Clone for Underscore
impl Clone for Underscore
Source§fn clone(&self) -> Underscore
fn clone(&self) -> Underscore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Underscore
Source§impl Debug for Underscore
impl Debug for Underscore
Source§impl Default for Underscore
impl Default for Underscore
Source§fn default() -> Underscore
fn default() -> Underscore
Returns the “default value” for a type. Read more
Source§impl Display for Underscore
impl Display for Underscore
impl Eq for Underscore
Source§impl From<Underscore> for Punct
impl From<Underscore> for Punct
Source§fn from(value: Underscore) -> Self
fn from(value: Underscore) -> Self
Converts to this type from the input type.
Source§impl Hash for Underscore
impl Hash for Underscore
Source§impl PartialEq for Underscore
impl PartialEq for Underscore
Source§impl Scan for Underscore
impl Scan for Underscore
impl StructuralPartialEq for Underscore
Source§impl ToTokens for Underscore
impl ToTokens for Underscore
fn to_tokens(&self, tokens: &mut TokenStream)
Auto Trait Implementations§
impl !Send for Underscore
impl !Sync for Underscore
impl Freeze for Underscore
impl RefUnwindSafe for Underscore
impl Unpin for Underscore
impl UnsafeUnpin for Underscore
impl UnwindSafe for Underscore
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