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<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 !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
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