[−][src]Struct chalk_ir::WithKind
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]
OP: FnOnce(T) -> U,
Maps the value in WithKind
.
pub fn map_ref<U, OP>(&self, op: OP) -> WithKind<I, U> where
OP: FnOnce(&T) -> U,
[src]
OP: FnOnce(&T) -> U,
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: 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]
I::InternedType: Copy,
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]
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<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,
T: RefUnwindSafe,
<I as Interner>::InternedType: RefUnwindSafe,
impl<I, T> Send for WithKind<I, T> where
T: Send,
<I as Interner>::InternedType: Send,
T: Send,
<I as Interner>::InternedType: Send,
impl<I, T> Sync for WithKind<I, T> where
T: Sync,
<I as Interner>::InternedType: Sync,
T: Sync,
<I as Interner>::InternedType: Sync,
impl<I, T> Unpin for WithKind<I, T> where
T: Unpin,
<I as Interner>::InternedType: Unpin,
T: Unpin,
<I as Interner>::InternedType: Unpin,
impl<I, T> UnwindSafe for WithKind<I, T> where
T: UnwindSafe,
<I as Interner>::InternedType: UnwindSafe,
T: UnwindSafe,
<I as Interner>::InternedType: UnwindSafe,
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<T> Cast for T
[src]
fn cast<U>(self, interner: &U::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
[src]
Self: CastTo<U>,
U: HasInterner,
impl<T> From<T> for T
[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>,