pub struct EqValue<T> {
pub eq: Eq,
pub value: T,
}
Expand description
An = ...
e.g. inside an attribute #[doc = ...]
.
To get unparsed tokens use EqValue<TokenStream>
.
Fields§
§eq: Eq
The =
token.
value: T
The remainder.
Trait Implementations§
Source§impl<T: Spanned> OptionSpanned for EqValue<T>
impl<T: Spanned> OptionSpanned for EqValue<T>
Source§fn option_span(&self) -> Option<Span>
fn option_span(&self) -> Option<Span>
Get the optional span of the type.
Source§impl<T: ToTokens> ToTokens for EqValue<T>
impl<T: ToTokens> ToTokens for EqValue<T>
Source§fn to_tokens(
&self,
context: &mut MacroContext<'_, '_, '_>,
stream: &mut TokenStream,
) -> Result<()>
fn to_tokens( &self, context: &mut MacroContext<'_, '_, '_>, stream: &mut TokenStream, ) -> Result<()>
Turn the current item into tokens.
impl<T: Eq> Eq for EqValue<T>
impl<T> StructuralPartialEq for EqValue<T>
Auto Trait Implementations§
impl<T> Freeze for EqValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for EqValue<T>where
T: RefUnwindSafe,
impl<T> Send for EqValue<T>where
T: Send,
impl<T> Sync for EqValue<T>where
T: Sync,
impl<T> Unpin for EqValue<T>where
T: Unpin,
impl<T> UnwindSafe for EqValue<T>where
T: UnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.