pub enum FnKind<'a> {
Fn(FnCtxt, Ident, &'a FnSig, &'a Visibility, &'a Generics, Option<&'a Block>),
Closure(&'a ClosureBinder, &'a FnDecl, &'a Expr),
}
Variants§
Fn(FnCtxt, Ident, &'a FnSig, &'a Visibility, &'a Generics, Option<&'a Block>)
E.g., fn foo()
, fn foo(&self)
, or extern "Abi" fn foo()
.
Closure(&'a ClosureBinder, &'a FnDecl, &'a Expr)
E.g., |x, y| body
.
Implementations§
Trait Implementations§
impl<'a> Copy for FnKind<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for FnKind<'a>
impl<'a> !Send for FnKind<'a>
impl<'a> !Sync for FnKind<'a>
impl<'a> Unpin for FnKind<'a>
impl<'a> !UnwindSafe for FnKind<'a>
Blanket Implementations§
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: 48 bytes
Size for each variant:
Fn
: 47 bytesClosure
: 31 bytes