pub struct ContList(pub Vec<Cont>);Expand description
A continuation list, head first.
Tuple Fields§
§0: Vec<Cont>Implementations§
Source§impl ContList
impl ContList
Sourcepub fn name_dummies(&mut self)
pub fn name_dummies(&mut self)
Gives every attribute continuation a random dummy name, so two trampolines in one module never collide.
Sourcepub fn invoke(&self, body: TokenStream) -> TokenStream
pub fn invoke(&self, body: TokenStream) -> TokenStream
Invokes the head with @announce_format "1" [self] body, where body is
ENTRY* REST (a derive or attribute head gets the same tokens in the dummy
enum).
Sourcepub fn invoke_with_options(
&self,
options: Option<&TokenStream>,
body: TokenStream,
) -> TokenStream
pub fn invoke_with_options( &self, options: Option<&TokenStream>, body: TokenStream, ) -> TokenStream
Like invoke, with a global options group
@announce_format "1" (options) [..] ...
A derive or attribute head is refused (compile_error!) when the group
starts with expr (is_expression_position).
Trait Implementations§
Source§impl FromIterator<Cont> for ContList
impl FromIterator<Cont> for ContList
Source§impl Parse for ContList
impl Parse for ContList
Source§fn parse(input: ParseStream<'_>) -> Result<Self>
fn parse(input: ParseStream<'_>) -> Result<Self>
Parses the contents of the brackets: a!, #[derive(B)], c!.
Source§impl ToTokens for ContList
impl ToTokens for ContList
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Emits [a!, b!] including the brackets.
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl !Send for ContList
impl !Sync for ContList
impl Freeze for ContList
impl RefUnwindSafe for ContList
impl Unpin for ContList
impl UnsafeUnpin for ContList
impl UnwindSafe for ContList
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> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.