Enum proc_macro::Delimiter
1.29.0 · 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 are not directly writable in normal Rust code except as comments.
Therefore, they might not survive a roundtrip of a token stream through a string.
Trait Implementations
impl Copy for Delimiter
sourceimpl Eq for Delimiter
sourceimpl StructuralEq for Delimiter
sourceimpl StructuralPartialEq for Delimiter
sourceAuto Trait Implementations
impl RefUnwindSafe for Delimiter
impl Send for Delimiter
impl Sync for Delimiter
impl Unpin for Delimiter
impl UnwindSafe for Delimiter
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
source
impl<T> BorrowMut<T> for T where
T: ?Sized,
sourcefn borrow_mut(&mut self) -> &mut T
const: unstable · source
fn borrow_mut(&mut self) -> &mut T
const: unstable · sourceMutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
source
impl<T> ToOwned for T where
T: Clone,
sourcetype Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
source
fn clone_into(&self, target: &mut T)
sourceUses borrowed data to replace owned data, usually by cloning. Read more