Enum erg_compiler::ty::value::GenTypeObj
source · pub enum GenTypeObj {
Class(ClassTypeObj),
Subclass(InheritedTypeObj),
Trait(TraitTypeObj),
Subtrait(SubsumedTypeObj),
Structural(StructuralTypeObj),
Union(UnionTypeObj),
Intersection(IntersectionTypeObj),
Patch(PatchObj),
}
Variants§
Class(ClassTypeObj)
Subclass(InheritedTypeObj)
Trait(TraitTypeObj)
Subtrait(SubsumedTypeObj)
Structural(StructuralTypeObj)
Union(UnionTypeObj)
Intersection(IntersectionTypeObj)
Patch(PatchObj)
Implementations§
source§impl GenTypeObj
impl GenTypeObj
pub fn class( t: Type, require: Option<TypeObj>, impls: Option<TypeObj>, inited: bool, ) -> Self
pub fn inherited( t: Type, sup: TypeObj, impls: Option<TypeObj>, additional: Option<TypeObj>, ) -> Self
pub fn trait_( t: Type, require: TypeObj, impls: Option<TypeObj>, inited: bool, ) -> Self
pub fn patch(t: Type, base: TypeObj, impls: Option<TypeObj>) -> Self
pub fn subsumed( t: Type, sup: TypeObj, impls: Option<TypeObj>, additional: Option<TypeObj>, ) -> Self
pub fn union(t: Type, lhs: TypeObj, rhs: TypeObj) -> Self
pub fn intersection(t: Type, lhs: TypeObj, rhs: TypeObj) -> Self
pub fn structural(t: Type, type_: TypeObj) -> Self
pub const fn is_inited(&self) -> bool
pub fn base_or_sup(&self) -> Option<&TypeObj>
pub fn impls(&self) -> Option<&TypeObj>
pub fn impls_mut(&mut self) -> Option<&mut Option<Box<TypeObj>>>
pub fn additional(&self) -> Option<&TypeObj>
pub fn meta_type(&self) -> Type
pub fn typ(&self) -> &Type
pub fn typ_mut(&mut self) -> &mut Type
pub fn into_typ(self) -> Type
pub fn map_t(&mut self, f: impl FnOnce(Type) -> Type)
pub fn map_tp(&mut self, f: &mut impl FnMut(TyParam) -> TyParam)
pub fn try_map_t<E>( &mut self, f: impl FnOnce(Type) -> Result<Type, E>, ) -> Result<(), E>
pub fn try_map_tp<E>( &mut self, f: &mut impl FnMut(TyParam) -> Result<TyParam, E>, ) -> Result<(), E>
Trait Implementations§
source§impl Clone for GenTypeObj
impl Clone for GenTypeObj
source§fn clone(&self) -> GenTypeObj
fn clone(&self) -> GenTypeObj
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GenTypeObj
impl Debug for GenTypeObj
source§impl Display for GenTypeObj
impl Display for GenTypeObj
source§impl Hash for GenTypeObj
impl Hash for GenTypeObj
source§impl LimitedDisplay for GenTypeObj
impl LimitedDisplay for GenTypeObj
source§impl PartialEq for GenTypeObj
impl PartialEq for GenTypeObj
impl Eq for GenTypeObj
impl StructuralPartialEq for GenTypeObj
Auto Trait Implementations§
impl Freeze for GenTypeObj
impl RefUnwindSafe for GenTypeObj
impl Send for GenTypeObj
impl Sync for GenTypeObj
impl Unpin for GenTypeObj
impl UnwindSafe for GenTypeObj
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
)