pub struct Delimited {
pub delim: DelimToken,
pub open_span: Span,
pub tts: Vec<TokenTree>,
pub close_span: Span,
}
Expand description
A delimited sequence of token trees
Fields§
§delim: DelimToken
The type of delimiter
open_span: Span
The span covering the opening delimiter
tts: Vec<TokenTree>
The delimited sequence of token trees
close_span: Span
The span covering the closing delimiter
Implementations§
Source§impl Delimited
impl Delimited
Sourcepub fn open_token(&self) -> Token
pub fn open_token(&self) -> Token
Returns the opening delimiter as a token.
Sourcepub fn close_token(&self) -> Token
pub fn close_token(&self) -> Token
Returns the closing delimiter as a token.
Trait Implementations§
impl Eq for Delimited
impl StructuralPartialEq for Delimited
Auto Trait Implementations§
impl Freeze for Delimited
impl RefUnwindSafe for Delimited
impl !Send for Delimited
impl !Sync for Delimited
impl Unpin for Delimited
impl UnwindSafe for Delimited
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§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
)