Enum ra_ap_hir::Adt[][src]

pub enum Adt {
    Struct(Struct),
    Union(Union),
    Enum(Enum),
}

A Data Type

Variants

Struct(Struct)
Union(Union)
Enum(Enum)

Implementations

impl Adt[src]

pub fn has_non_default_type_params(self, db: &dyn HirDatabase) -> bool[src]

pub fn ty(self, db: &dyn HirDatabase) -> Type[src]

Turns this ADT into a type. Any type parameters of the ADT will be turned into unknown types, which is good for e.g. finding the most general set of completions, but will not look very nice when printed.

pub fn module(self, db: &dyn HirDatabase) -> Module[src]

pub fn krate(self, db: &dyn HirDatabase) -> Option<Crate>[src]

pub fn name(self, db: &dyn HirDatabase) -> Name[src]

Trait Implementations

impl Clone for Adt[src]

impl Copy for Adt[src]

impl Debug for Adt[src]

impl Eq for Adt[src]

impl From<Adt> for ModuleDef[src]

impl From<Adt> for GenericDef[src]

impl From<AdtId> for Adt[src]

impl From<Enum> for Adt[src]

impl From<Struct> for Adt[src]

impl From<Union> for Adt[src]

impl HasAttrs for Adt[src]

impl Hash for Adt[src]

impl PartialEq<Adt> for Adt[src]

impl StructuralEq for Adt[src]

impl StructuralPartialEq for Adt[src]

Auto Trait Implementations

impl RefUnwindSafe for Adt

impl Send for Adt

impl Sync for Adt

impl Unpin for Adt

impl UnwindSafe for Adt

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> Cast for T

impl<T> CloneAny for T where
    T: Clone + Any

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> HasResolver for T where
    T: Into<AdtId> + Copy
[src]

impl<T> Instrument 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.