pub(crate) struct TypeVar {
content: Rc<RefCell<TypeVarContent>>,
}
Fields§
§content: Rc<RefCell<TypeVarContent>>
Implementations§
Source§impl TypeVar
impl TypeVar
pub fn new( name: impl Into<String>, doc: impl Into<String>, type_set: TypeSet, ) -> Self
pub fn new_singleton(value_type: ValueType) -> Self
Sourcepub fn copy_from(other: &TypeVar, name: String) -> TypeVar
pub fn copy_from(other: &TypeVar, name: String) -> TypeVar
Get a fresh copy of self, named after name
. Can only be called on non-derived typevars.
Sourcepub fn get_typeset(&self) -> TypeSet
pub fn get_typeset(&self) -> TypeSet
Returns the typeset for this TV. If the TV is derived, computes it recursively from the derived function and the base’s typeset. Note this can’t be done non-lazily in the constructor, because the TypeSet of the base may change over time.
Sourcepub fn get_raw_typeset(&self) -> &TypeSet
pub fn get_raw_typeset(&self) -> &TypeSet
Returns this typevar’s type set, assuming this type var has no parent.
Sourcepub fn singleton_type(&self) -> Option<ValueType>
pub fn singleton_type(&self) -> Option<ValueType>
If the associated typeset has a single type return it. Otherwise return None.
Sourcepub fn free_typevar(&self) -> Option<TypeVar>
pub fn free_typevar(&self) -> Option<TypeVar>
Get the free type variable controlling this one.
Sourcepub fn derived(&self, derived_func: DerivedFunc) -> TypeVar
pub fn derived(&self, derived_func: DerivedFunc) -> TypeVar
Create a type variable that is a function of another.
pub fn lane_of(&self) -> TypeVar
pub fn as_truthy(&self) -> TypeVar
pub fn half_width(&self) -> TypeVar
pub fn double_width(&self) -> TypeVar
pub fn split_lanes(&self) -> TypeVar
pub fn merge_lanes(&self) -> TypeVar
pub fn dynamic_to_vector(&self) -> TypeVar
Trait Implementations§
Source§impl From<&TypeVar> for OperandKind
impl From<&TypeVar> for OperandKind
impl Eq 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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
)