pub(crate) enum TokenStream {
Compiler(DeferredTokenStream),
Fallback(TokenStream),
}
Variants§
Compiler(DeferredTokenStream)
Fallback(TokenStream)
Implementations§
source§impl TokenStream
impl TokenStream
pub(crate) fn new() -> Self
pub(crate) fn from_str_checked(src: &str) -> Result<Self, LexError>
pub(crate) fn is_empty(&self) -> bool
fn unwrap_nightly(self) -> TokenStream
fn unwrap_stable(self) -> TokenStream
Trait Implementations§
source§impl Clone for TokenStream
impl Clone for TokenStream
source§fn clone(&self) -> TokenStream
fn clone(&self) -> TokenStream
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 TokenStream
impl Debug for TokenStream
source§impl Display for TokenStream
impl Display for TokenStream
source§impl Extend<TokenStream> for TokenStream
impl Extend<TokenStream> for TokenStream
source§fn extend<I: IntoIterator<Item = TokenStream>>(&mut self, streams: I)
fn extend<I: IntoIterator<Item = TokenStream>>(&mut self, streams: I)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl Extend<TokenTree> for TokenStream
impl Extend<TokenTree> for TokenStream
source§fn extend<I: IntoIterator<Item = TokenTree>>(&mut self, stream: I)
fn extend<I: IntoIterator<Item = TokenTree>>(&mut self, stream: I)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl From<TokenStream> for TokenStream
impl From<TokenStream> for TokenStream
source§fn from(inner: TokenStream) -> Self
fn from(inner: TokenStream) -> Self
Converts to this type from the input type.
source§impl From<TokenStream> for TokenStream
impl From<TokenStream> for TokenStream
source§fn from(inner: TokenStream) -> Self
fn from(inner: TokenStream) -> Self
Converts to this type from the input type.
source§impl From<TokenTree> for TokenStream
impl From<TokenTree> for TokenStream
source§impl FromIterator<TokenStream> for TokenStream
impl FromIterator<TokenStream> for TokenStream
source§fn from_iter<I: IntoIterator<Item = TokenStream>>(streams: I) -> Self
fn from_iter<I: IntoIterator<Item = TokenStream>>(streams: I) -> Self
Creates a value from an iterator. Read more
source§impl FromIterator<TokenTree> for TokenStream
impl FromIterator<TokenTree> for TokenStream
source§impl IntoIterator for TokenStream
impl IntoIterator for TokenStream
Auto Trait Implementations§
impl Freeze for TokenStream
impl RefUnwindSafe for TokenStream
impl !Send for TokenStream
impl !Sync for TokenStream
impl Unpin for TokenStream
impl UnwindSafe for TokenStream
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)