[][src]Struct chalk_ir::WithKind

pub struct WithKind<I: Interner, T> {
    pub kind: VariableKind<I>,
    // some fields omitted
}

A value with an associated variable kind.

Fields

kind: VariableKind<I>

The associated variable kind.

Implementations

impl<I: Interner, T> WithKind<I, T>[src]

pub fn new(kind: VariableKind<I>, value: T) -> Self[src]

Creates a WithKind from a variable kind and a value.

pub fn map<U, OP>(self, op: OP) -> WithKind<I, U> where
    OP: FnOnce(T) -> U, 
[src]

Maps the value in WithKind.

pub fn map_ref<U, OP>(&self, op: OP) -> WithKind<I, U> where
    OP: FnOnce(&T) -> U, 
[src]

Maps a function taking WithKind<I, &T> over &WithKind<I, T>.

pub fn skip_kind(&self) -> &T[src]

Extract the value, ignoring the variable kind.

Trait Implementations

impl<I: Interner> CastTo<WithKind<I, UniverseIndex>> for CanonicalVarKind<I>[src]

impl<I: Clone + Interner, T: Clone> Clone for WithKind<I, T>[src]

impl<I: Interner, T: Copy> Copy for WithKind<I, T> where
    I::InternedType: Copy
[src]

impl<I: Interner, T: Debug> Debug for WithKind<I, T>[src]

impl<I: Eq + Interner, T: Eq> Eq for WithKind<I, T>[src]

impl<I: Interner, T> From<WithKind<I, T>> for (VariableKind<I>, T)[src]

impl<I: Interner, T> HasInterner for WithKind<I, T>[src]

type Interner = I

The interner associated with the type.

impl<I: Hash + Interner, T: Hash> Hash for WithKind<I, T>[src]

impl<I: PartialEq + Interner, T: PartialEq> PartialEq<WithKind<I, T>> for WithKind<I, T>[src]

impl<I: Interner, T> StructuralEq for WithKind<I, T>[src]

impl<I: Interner, T> StructuralPartialEq for WithKind<I, T>[src]

Auto Trait Implementations

impl<I, T> RefUnwindSafe for WithKind<I, T> where
    T: RefUnwindSafe,
    <I as Interner>::InternedType: RefUnwindSafe

impl<I, T> Send for WithKind<I, T> where
    T: Send,
    <I as Interner>::InternedType: Send

impl<I, T> Sync for WithKind<I, T> where
    T: Sync,
    <I as Interner>::InternedType: Sync

impl<I, T> Unpin for WithKind<I, T> where
    T: Unpin,
    <I as Interner>::InternedType: Unpin

impl<I, T> UnwindSafe for WithKind<I, T> where
    T: UnwindSafe,
    <I as Interner>::InternedType: UnwindSafe

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> Cast for T[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.