Struct rustc_expand::mbe::Delimited
source · [−]struct Delimited {
delim: DelimToken,
all_tts: Vec<TokenTree>,
}Expand description
Contains the sub-token-trees of a “delimited” token tree such as (a b c). The delimiter itself
might be NoDelim.
Fields
delim: DelimTokenall_tts: Vec<TokenTree>Note: This contains the opening and closing delimiters tokens (e.g. ( and )). Note that
these could be NoDelim. These token kinds must match delim, and the methods below
debug_assert this.
Implementations
sourceimpl Delimited
impl Delimited
sourcefn open_tt(&self) -> &TokenTree
fn open_tt(&self) -> &TokenTree
Returns a self::TokenTree with a Span corresponding to the opening delimiter. Panics if
the delimiter is NoDelim.
Trait Implementations
impl StructuralPartialEq for Delimited
Auto Trait Implementations
impl !RefUnwindSafe for Delimited
impl !Send for Delimited
impl !Sync for Delimited
impl Unpin for Delimited
impl !UnwindSafe for Delimited
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes