pub struct Type(/* private fields */);Implementations§
Source§impl Type
impl Type
pub fn new(kind: TypeKind) -> Self
pub fn con(name: impl AsRef<str>, arity: usize) -> Self
pub fn user_con(name: impl AsRef<str>, arity: usize) -> Self
pub fn builtin(id: BuiltinTypeId) -> Self
pub fn var(tv: TypeVar) -> Self
pub fn fun(a: Type, b: Type) -> Self
pub fn app(f: Type, arg: Type) -> Self
pub fn tuple(elems: Vec<Type>) -> Self
pub fn record(fields: Vec<(Symbol, Type)>) -> Self
pub fn list(elem: Type) -> Type
pub fn array(elem: Type) -> Type
pub fn dict(elem: Type) -> Type
pub fn option(elem: Type) -> Type
pub fn result(ok: Type, err: Type) -> Type
Trait Implementations§
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Type
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