Type Alias chalk_ir::CanonicalVarKind
source · pub type CanonicalVarKind<I: Interner> = WithKind<I, UniverseIndex>;
Expand description
A variable kind with universe index.
Aliased Type§
struct CanonicalVarKind<I: Interner> {
pub kind: VariableKind<I>,
pub(crate) value: UniverseIndex,
}
Fields§
§kind: VariableKind<I>
The associated variable kind.
value: UniverseIndex
The wrapped value.
Implementations
source§impl<I: Interner, T> WithKind<I, T>
impl<I: Interner, T> WithKind<I, T>
sourcepub fn new(kind: VariableKind<I>, value: T) -> Self
pub fn new(kind: VariableKind<I>, value: T) -> Self
Creates a WithKind
from a variable kind and a value.
sourcepub fn map<U, OP>(self, op: OP) -> WithKind<I, U>where
OP: FnOnce(T) -> U,
pub fn map<U, OP>(self, op: OP) -> WithKind<I, U>where
OP: FnOnce(T) -> U,
Maps the value in WithKind
.
Trait Implementations§
source§impl<I: Interner> CastTo<WithKind<I, UniverseIndex>> for CanonicalVarKind<I>
impl<I: Interner> CastTo<WithKind<I, UniverseIndex>> for CanonicalVarKind<I>
source§fn cast_to(
self,
_interner: <CanonicalVarKind<I> as HasInterner>::Interner,
) -> CanonicalVarKind<I>
fn cast_to( self, _interner: <CanonicalVarKind<I> as HasInterner>::Interner, ) -> CanonicalVarKind<I>
Cast a value to type
T
.