Enum erg_compiler::ty::value::TypeObj
source · pub enum TypeObj {
Builtin {
t: Type,
meta_t: Type,
},
Generated(GenTypeObj),
}
Variants§
Implementations§
source§impl TypeObj
impl TypeObj
pub fn builtin_type(t: Type) -> Self
pub fn builtin_trait(t: Type) -> Self
pub fn typ(&self) -> &Type
pub fn typ_mut(&mut self) -> &mut Type
pub fn into_typ(self) -> Type
pub fn contains_intersec(&self, other: &Type) -> bool
pub fn map_t(&mut self, f: impl FnOnce(Type) -> Type)
pub fn try_map_t<E>( &mut self, f: impl FnOnce(Type) -> Result<Type, E> ) -> Result<(), E>
Trait Implementations§
source§impl LimitedDisplay for TypeObj
impl LimitedDisplay for TypeObj
source§impl PartialEq<TypeObj> for TypeObj
impl PartialEq<TypeObj> for TypeObj
impl Eq for TypeObj
impl StructuralEq for TypeObj
Auto Trait Implementations§
impl RefUnwindSafe for TypeObj
impl Send for TypeObj
impl Sync for TypeObj
impl Unpin for TypeObj
impl UnwindSafe for TypeObj
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