Struct rustc_ast::tokenstream::LazyAttrTokenStream
source · pub struct LazyAttrTokenStream(Lrc<Box<dyn ToAttrTokenStream>>);
Expand description
A lazy version of TokenStream
, which defers creation
of an actual TokenStream
until it is needed.
Box
is here only to reduce the structure size.
Tuple Fields§
§0: Lrc<Box<dyn ToAttrTokenStream>>
Implementations§
source§impl LazyAttrTokenStream
impl LazyAttrTokenStream
pub fn new(inner: impl ToAttrTokenStream + 'static) -> LazyAttrTokenStream
pub fn to_attr_token_stream(&self) -> AttrTokenStream
Trait Implementations§
source§impl Clone for LazyAttrTokenStream
impl Clone for LazyAttrTokenStream
source§fn clone(&self) -> LazyAttrTokenStream
fn clone(&self) -> LazyAttrTokenStream
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 LazyAttrTokenStream
impl Debug for LazyAttrTokenStream
source§impl<D: SpanDecoder> Decodable<D> for LazyAttrTokenStream
impl<D: SpanDecoder> Decodable<D> for LazyAttrTokenStream
source§impl<S: SpanEncoder> Encodable<S> for LazyAttrTokenStream
impl<S: SpanEncoder> Encodable<S> for LazyAttrTokenStream
source§impl<CTX> HashStable<CTX> for LazyAttrTokenStream
impl<CTX> HashStable<CTX> for LazyAttrTokenStream
fn hash_stable(&self, _hcx: &mut CTX, _hasher: &mut StableHasher)
Auto Trait Implementations§
impl DynSend for LazyAttrTokenStream
impl DynSync for LazyAttrTokenStream
impl Freeze for LazyAttrTokenStream
impl !RefUnwindSafe for LazyAttrTokenStream
impl !Send for LazyAttrTokenStream
impl !Sync for LazyAttrTokenStream
impl Unpin for LazyAttrTokenStream
impl !UnwindSafe for LazyAttrTokenStream
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes