[−][src]Enum rustc_ap_rustc_ast::ast::ItemKind
Variants
An extern crate item, with the optional original crate name if the crate was renamed.
E.g., extern crate foo or extern crate foo_bar as foo.
A use declaration item (use).
E.g., use foo;, use foo::bar; or use foo::bar as FooBar;.
A static item (static).
E.g., static FOO: i32 = 42; or static FOO: &'static str = "bar";.
A constant item (const).
E.g., const FOO: i32 = 42;.
A function declaration (fn).
E.g., fn foo(bar: usize) -> usize { .. }.
Mod(Mod)A module declaration (mod).
E.g., mod foo; or mod foo { .. }.
ForeignMod(ForeignMod)An external module (extern).
E.g., extern {} or extern "C" {}.
Module-level inline assembly (from global_asm!()).
TyAlias(Defaultness, Generics, GenericBounds, Option<P<Ty>>)A type alias (type).
E.g., type Foo = Bar<u8>;.
An enum definition (enum).
E.g., enum Foo<A, B> { C<A>, D<B> }.
Struct(VariantData, Generics)A struct definition (struct).
E.g., struct Foo<A> { x: A }.
Union(VariantData, Generics)A union definition (union).
E.g., union Foo<A, B> { x: A, y: B }.
A trait declaration (trait).
E.g., trait Foo { .. }, trait Foo<T> { .. } or auto trait Foo {}.
TraitAlias(Generics, GenericBounds)Trait alias
E.g., trait Foo = Bar + Quux;.
An implementation.
E.g., impl<A> Foo<A> { .. } or impl<A> Trait for Foo<A> { .. }.
Fields of Impl
MacCall(MacCall)A macro invocation.
E.g., foo!(..).
MacroDef(MacroDef)A macro definition.
Methods
impl ItemKind[src]
pub fn article(&self) -> &str[src]
pub fn descr(&self) -> &str[src]
pub fn generics(&self) -> Option<&Generics>[src]
Trait Implementations
impl Clone for ItemKind[src]
impl Debug for ItemKind[src]
impl Decodable for ItemKind[src]
impl Encodable for ItemKind[src]
impl From<AssocItemKind> for ItemKind[src]
fn from(assoc_item_kind: AssocItemKind) -> ItemKind[src]
impl From<ForeignItemKind> for ItemKind[src]
fn from(foreign_item_kind: ForeignItemKind) -> ItemKind[src]
impl TryFrom<ItemKind> for AssocItemKind[src]
type Error = ItemKind
The type returned in the event of a conversion error.
fn try_from(item_kind: ItemKind) -> Result<AssocItemKind, ItemKind>[src]
impl TryFrom<ItemKind> for ForeignItemKind[src]
Auto Trait Implementations
impl !RefUnwindSafe for ItemKind
impl !Send for ItemKind
impl !Sync for ItemKind
impl Unpin for ItemKind
impl !UnwindSafe for ItemKind
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Decodable for T where
T: UseSpecializedDecodable, [src]
T: UseSpecializedDecodable,
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized, [src]
T: UseSpecializedEncodable + ?Sized,
impl<T> Erased for T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<E> SpecializationError for E[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized, [src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,