Struct ra_ap_hir_ty::GenericArg[][src]

pub struct GenericArg { /* fields omitted */ }

Implementations

impl GenericArg[src]

pub fn new(_interner: &Interner, data: GenericArgData) -> Self[src]

Constructs a generic argument using GenericArgData.

pub fn interned(&self) -> &GenericArgData[src]

Gets the interned value.

pub fn assert_ty_ref(&self, interner: &Interner) -> &Ty[src]

Asserts that this is a type argument.

pub fn is_ty(&self, _interner: &Interner) -> bool[src]

Checks whether the generic argument is a type.

pub fn ty(&self, _interner: &Interner) -> Option<&Ty>[src]

Returns the type if it is one, None otherwise.

pub fn interned_mut(&mut self) -> &mut GenericArgData[src]

Trait Implementations

impl CastTo<GenericArg> for Ty[src]

impl CastTo<GenericArg> for GenericArg[src]

impl Clone for GenericArg[src]

impl Debug for GenericArg[src]

impl Eq for GenericArg[src]

impl HasInterner for GenericArg[src]

type Interner = Interner

The interner associated with the type.

impl Hash for GenericArg[src]

impl HirDisplay for GenericArg[src]

impl PartialEq<GenericArg> for GenericArg[src]

impl StructuralEq for GenericArg[src]

impl StructuralPartialEq for GenericArg[src]

impl TypeWalk for GenericArg[src]

Auto Trait Implementations

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[src]

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

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> 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.