pub struct WithTokens<T> {
pub node: T,
pub tokens: Option<LazyAttrTokenStream>,
}Fields§
§node: T§tokens: Option<LazyAttrTokenStream>Implementations§
Source§impl<T> WithTokens<T>
impl<T> WithTokens<T>
pub fn new(node: T) -> WithTokens<T>
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> WithTokens<U>
Trait Implementations§
Source§impl<T: Clone> Clone for WithTokens<T>
impl<T: Clone> Clone for WithTokens<T>
Source§fn clone(&self) -> WithTokens<T>
fn clone(&self) -> WithTokens<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for WithTokens<T>
impl<T: Debug> Debug for WithTokens<T>
Source§impl<T: HasAttrs> HasAttrs for WithTokens<T>
impl<T: HasAttrs> HasAttrs for WithTokens<T>
Source§const SUPPORTS_CUSTOM_INNER_ATTRS: bool = T::SUPPORTS_CUSTOM_INNER_ATTRS
const SUPPORTS_CUSTOM_INNER_ATTRS: bool = T::SUPPORTS_CUSTOM_INNER_ATTRS
This is
true if this HasAttrs might support ‘custom’ (proc-macro) inner
attributes. Attributes like #![cfg] and #![cfg_attr] are not
considered ‘custom’ attributes. Read morefn attrs(&self) -> &[Attribute]
fn visit_attrs(&mut self, f: impl FnOnce(&mut AttrVec))
Source§impl<T: HasAttrs> HasTokens for WithTokens<T>
impl<T: HasAttrs> HasTokens for WithTokens<T>
fn tokens(&self) -> Option<&LazyAttrTokenStream>
fn tokens_mut(&mut self) -> Option<&mut Option<LazyAttrTokenStream>>
Auto Trait Implementations§
impl<T> DynSend for WithTokens<T>where
T: DynSend,
impl<T> DynSync for WithTokens<T>where
T: DynSync,
impl<T> Freeze for WithTokens<T>where
T: Freeze,
impl<T> RefUnwindSafe for WithTokens<T>where
T: RefUnwindSafe,
impl<T> Send for WithTokens<T>where
T: Send,
impl<T> Sync for WithTokens<T>where
T: Sync,
impl<T> Unpin for WithTokens<T>where
T: Unpin,
impl<T> UnsafeUnpin for WithTokens<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for WithTokens<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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.