Enum proc_macro2::Delimiter
source · pub enum Delimiter {
Parenthesis,
Brace,
Bracket,
None,
}
Expand description
Describes how a sequence of token trees is delimited.
Variants§
Parenthesis
( ... )
Brace
{ ... }
Bracket
[ ... ]
None
∅ ... ∅
An invisible delimiter, that may, for example, appear around tokens
coming from a “macro variable” $var
. It is important to preserve
operator priorities in cases like $var * 3
where $var
is 1 + 2
.
Invisible delimiters may not survive roundtrip of a token stream through
a string.
Trait Implementations§
impl Copy for Delimiter
impl Eq for Delimiter
impl StructuralPartialEq for Delimiter
Auto Trait Implementations§
impl Freeze for Delimiter
impl RefUnwindSafe for Delimiter
impl Send for Delimiter
impl Sync for Delimiter
impl Unpin for Delimiter
impl UnwindSafe for Delimiter
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)