[−][src]Enum rustc_ast::ast::ForeignItemKind

pub enum ForeignItemKind {
    Static(P<Ty>, Mutability, Option<P<Expr>>),
    Fn(Defaultness, FnSig, Generics, Option<P<Block>>),
    TyAlias(Defaultness, Generics, GenericBounds, Option<P<Ty>>),
    MacCall(MacCall),
}

An item in extern block.

Variants

Static(P<Ty>, Mutability, Option<P<Expr>>)

A foreign static item (static FOO: u8).

Fn(Defaultness, FnSig, Generics, Option<P<Block>>)

A foreign function.

TyAlias(Defaultness, Generics, GenericBounds, Option<P<Ty>>)

A foreign type.

MacCall(MacCall)

A macro expanding to foreign items.

Trait Implementations

impl Clone for ForeignItemKind[src]

impl Debug for ForeignItemKind[src]

impl<__D: Decoder> Decodable<__D> for ForeignItemKind[src]

impl<__E: Encoder> Encodable<__E> for ForeignItemKind[src]

impl From<ForeignItemKind> for ItemKind[src]

impl TryFrom<ItemKind> for ForeignItemKind[src]

type Error = ItemKind

The type returned in the event of a conversion error.

Auto Trait Implementations

impl !RefUnwindSafe for ForeignItemKind

impl !Send for ForeignItemKind

impl !Sync for ForeignItemKind

impl Unpin for ForeignItemKind

impl !UnwindSafe for ForeignItemKind

Blanket Implementations

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

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

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

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 = Infallible

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.