Enum erg_compiler::ty::value::GenTypeObj
source · pub enum GenTypeObj {
Class(ClassTypeObj),
Subclass(InheritedTypeObj),
Trait(TraitTypeObj),
Subtrait(SubsumedTypeObj),
StructuralTrait(TraitTypeObj),
Union(UnionTypeObj),
Intersection(IntersectionTypeObj),
Patch(PatchObj),
}
Variants§
Class(ClassTypeObj)
Subclass(InheritedTypeObj)
Trait(TraitTypeObj)
Subtrait(SubsumedTypeObj)
StructuralTrait(TraitTypeObj)
Union(UnionTypeObj)
Intersection(IntersectionTypeObj)
Patch(PatchObj)
Implementations§
source§impl GenTypeObj
impl GenTypeObj
pub fn class(t: Type, require: Option<TypeObj>, impls: Option<TypeObj>) -> 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>) -> 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 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
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 PartialEq<GenTypeObj> for GenTypeObj
impl PartialEq<GenTypeObj> for GenTypeObj
source§fn eq(&self, other: &GenTypeObj) -> bool
fn eq(&self, other: &GenTypeObj) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.