[−][src]Enum ra_ap_hir::Adt
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 AdtId
[src]
impl From<Adt> for GenericDefId
[src]
impl From<Adt> for ModuleDef
[src]
impl From<Adt> for GenericDef
[src]
fn from(it: Adt) -> 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]
fn attrs(self, db: &dyn HirDatabase) -> Attrs
[src]
fn docs(self, db: &dyn HirDatabase) -> Option<Documentation>
[src]
impl Hash for Adt
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
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<T> Cast for T
fn cast<U>(self, interner: &<U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Self: CastTo<U>,
U: HasInterner,
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> HasResolver for T where
T: Into<AdtId> + Copy,
[src]
T: Into<AdtId> + Copy,
fn resolver(self, db: &(dyn DefDatabase + 'static)) -> Resolver
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,