struct ItemFn {
outer_attrs: Vec<Attribute>,
vis: Visibility,
sig: Signature,
brace_token: Brace,
inner_attrs: Vec<Attribute>,
stmts: Vec<TokenStream>,
}
Fields§
§outer_attrs: Vec<Attribute>
§vis: Visibility
§sig: Signature
§brace_token: Brace
§inner_attrs: Vec<Attribute>
§stmts: Vec<TokenStream>
Implementations§
source§impl ItemFn
impl ItemFn
sourcefn attrs(&self) -> impl Iterator<Item = &Attribute>
fn attrs(&self) -> impl Iterator<Item = &Attribute>
Access all attributes of the function item.
sourcefn body(&self) -> Body<'_>
fn body(&self) -> Body<'_>
Get the body of the function item in a manner so that it can be
conveniently used with the quote!
macro.
sourcefn into_tokens(
self,
generated_attrs: TokenStream,
body: TokenStream,
last_block: TokenStream,
) -> TokenStream
fn into_tokens( self, generated_attrs: TokenStream, body: TokenStream, last_block: TokenStream, ) -> TokenStream
Convert our local function item into a token stream.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ItemFn
impl RefUnwindSafe for ItemFn
impl !Send for ItemFn
impl !Sync for ItemFn
impl Unpin for ItemFn
impl UnwindSafe for ItemFn
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