pub enum ValueOrExpr<'t, T, TExpr = TokenStream> {
Value(&'t T),
Expr(&'t TExpr),
}
Variants§
Trait Implementations§
Source§impl<'t, T: Clone, TExpr: Clone> Clone for ValueOrExpr<'t, T, TExpr>
impl<'t, T: Clone, TExpr: Clone> Clone for ValueOrExpr<'t, T, TExpr>
Source§fn clone(&self) -> ValueOrExpr<'t, T, TExpr>
fn clone(&self) -> ValueOrExpr<'t, T, TExpr>
Returns a duplicate 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<T: ToTokens, TExpr: ToTokens> ToTokens for ValueOrExpr<'_, T, TExpr>
impl<T: ToTokens, TExpr: ToTokens> ToTokens for ValueOrExpr<'_, T, TExpr>
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
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,
Auto Trait Implementations§
impl<'t, T, TExpr> Freeze for ValueOrExpr<'t, T, TExpr>
impl<'t, T, TExpr> RefUnwindSafe for ValueOrExpr<'t, T, TExpr>where
T: RefUnwindSafe,
TExpr: RefUnwindSafe,
impl<'t, T, TExpr> Send for ValueOrExpr<'t, T, TExpr>
impl<'t, T, TExpr> Sync for ValueOrExpr<'t, T, TExpr>
impl<'t, T, TExpr> Unpin for ValueOrExpr<'t, T, TExpr>
impl<'t, T, TExpr> UnwindSafe for ValueOrExpr<'t, T, TExpr>where
T: RefUnwindSafe,
TExpr: RefUnwindSafe,
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