pub struct Type(/* private fields */);Implementations§
Source§impl Type
impl Type
pub fn new(kind: TypeKind) -> Type
pub fn con(name: impl AsRef<str>, arity: usize) -> Type
pub fn user_con(name: impl AsRef<str>, arity: usize) -> Type
pub fn builtin(id: BuiltinTypeId) -> Type
pub fn var(tv: TypeVar) -> Type
pub fn fun(a: Type, b: Type) -> Type
pub fn app(f: Type, arg: Type) -> Type
pub fn tuple(elems: Vec<Type>) -> Type
pub fn record(fields: Vec<(Symbol, Type)>) -> Type
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