pub struct PartialExpr {
pub brace: Option<Brace>,
pub expr: TokenStream,
}
Expand description
A raw expression potentially wrapped in curly braces that is parsed from the input stream.
If there are no braces, it tries to parse as an expression without partial expansion. If there
are braces, it parses the contents as a TokenStream2
and stores it as such.
Fields§
§brace: Option<Brace>
§expr: TokenStream
Implementations§
Trait Implementations§
Source§impl Clone for PartialExpr
impl Clone for PartialExpr
Source§fn clone(&self) -> PartialExpr
fn clone(&self) -> PartialExpr
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PartialExpr
impl Debug for PartialExpr
Source§impl Hash for PartialExpr
impl Hash for PartialExpr
Source§impl Parse for PartialExpr
impl Parse for PartialExpr
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl PartialEq for PartialExpr
impl PartialEq for PartialExpr
Source§impl ToTokens for PartialExpr
impl ToTokens for PartialExpr
Source§fn to_tokens(&self, tokens: &mut TokenStream2)
fn to_tokens(&self, tokens: &mut TokenStream2)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
impl Eq for PartialExpr
Auto Trait Implementations§
impl Freeze for PartialExpr
impl RefUnwindSafe for PartialExpr
impl !Send for PartialExpr
impl !Sync for PartialExpr
impl Unpin for PartialExpr
impl UnwindSafe for PartialExpr
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§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.