Enum Delimiter
pub enum Delimiter {
Parenthesis,
Brace,
Bracket,
Invisible(InvisibleOrigin),
}Expand description
Describes how a sequence of token trees is delimited.
Cannot use proc_macro::Delimiter directly because this
structure should implement some additional traits.
Variants§
Parenthesis
( ... )
Brace
{ ... }
Bracket
[ ... ]
Invisible(InvisibleOrigin)
∅ ... ∅
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 might not survive roundtrip of a token stream through a string.
Auto Trait Implementations§
impl DynSend for Delimiter
impl DynSync for Delimiter
impl Freeze for Delimiter
impl RefUnwindSafe for Delimiter
impl Send for Delimiter
impl Sync for Delimiter
impl Unpin for Delimiter
impl UnsafeUnpin 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