[][src]Enum syntax::visit::FnKind

pub enum FnKind<'a> {
    ItemFn(Ident, &'a FnHeader, &'a Visibility, &'a Block),
    Method(Ident, &'a FnSigOption<&'a Visibility>, &'a Block),
    Closure(&'a Expr),
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Variants

ItemFn(Ident, &'a FnHeader, &'a Visibility, &'a Block)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

E.g., fn foo() or extern "Abi" fn foo().

Method(Ident, &'a FnSigOption<&'a Visibility>, &'a Block)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

E.g., fn foo(&self).

Closure(&'a Expr)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

E.g., |x, y| body.

Methods

impl<'a> FnKind<'a>[src]

pub fn header(&self) -> Option<&'a FnHeader>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Trait Implementations

impl<'a> Clone for FnKind<'a>[src]

impl<'a> Copy for FnKind<'a>[src]

Auto Trait Implementations

impl<'a> !Send for FnKind<'a>

impl<'a> !Sync for FnKind<'a>

impl<'a> Unpin for FnKind<'a>

impl<'a> !UnwindSafe for FnKind<'a>

impl<'a> !RefUnwindSafe for FnKind<'a>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]

impl<E> SpecializationError for E[src]