pub struct WithKind<I: Interner, T> {
pub kind: VariableKind<I>,
/* private fields */
}Expand description
A value with an associated variable kind.
Fields§
§kind: VariableKind<I>The associated variable kind.
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.Source§impl<I: Interner, T> HasInterner for WithKind<I, T>
impl<I: Interner, T> HasInterner for WithKind<I, T>
impl<I: Interner, T: Copy> Copy for WithKind<I, T>where
I::InternedType: Copy,
impl<I: Eq + Interner, T: Eq> Eq for WithKind<I, T>
impl<I: Interner, T> StructuralPartialEq for WithKind<I, T>
Auto Trait Implementations§
impl<I, T> Freeze for WithKind<I, T>
impl<I, T> RefUnwindSafe for WithKind<I, T>
impl<I, T> Send for WithKind<I, T>
impl<I, T> Sync for WithKind<I, T>
impl<I, T> Unpin for WithKind<I, T>
impl<I, T> UnwindSafe for WithKind<I, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more