Struct arithmetic_typing::TypeVar
source · pub struct TypeVar { /* private fields */ }
Expand description
Type variable.
A variable represents a certain unknown type. Variables can be either free
or bound to a Function
(these are known as type params in Rust).
Types input to a TypeEnvironment
can only have bounded variables (this is
verified in runtime), but types output by the inference process can contain both.
§Notation
- Bounded type variables are represented as
'T
,'U
,'V
, etc. The tick is inspired by lifetimes in Rust and implicit type params in F*. It allows to easily distinguish between vars and primitive types. - Free variables are represented as
_
.
Implementations§
Trait Implementations§
source§impl PartialEq for TypeVar
impl PartialEq for TypeVar
impl Copy for TypeVar
impl Eq for TypeVar
impl StructuralPartialEq for TypeVar
Auto Trait Implementations§
impl Freeze for TypeVar
impl RefUnwindSafe for TypeVar
impl Send for TypeVar
impl Sync for TypeVar
impl Unpin for TypeVar
impl UnwindSafe for TypeVar
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more