pub enum Type {
TypeSelf(TypeSelfType),
TypeBasic(TypeBasicType),
TypeTuple(TypeTupleType),
TypeLambda(TypeLambdaType),
}
Variants§
TypeSelf(TypeSelfType)
TypeBasic(TypeBasicType)
TypeTuple(TypeTupleType)
TypeLambda(TypeLambdaType)
Implementations§
Source§impl Type
impl Type
pub fn create_self(id: NodeId, pos: Position, span: Span) -> Type
pub fn create_basic( id: NodeId, pos: Position, span: Span, name: Name, params: Vec<Box<Type>>, ) -> Type
pub fn create_fct( id: NodeId, pos: Position, span: Span, params: Vec<Box<Type>>, ret: Box<Type>, ) -> Type
pub fn create_tuple( id: NodeId, pos: Position, span: Span, subtypes: Vec<Box<Type>>, ) -> Type
pub fn to_basic(&self) -> Option<&TypeBasicType>
pub fn to_basic_without_type_params(&self) -> Option<Name>
pub fn to_tuple(&self) -> Option<&TypeTupleType>
pub fn to_fct(&self) -> Option<&TypeLambdaType>
pub fn to_string(&self, interner: &Interner) -> String
pub fn pos(&self) -> Position
pub fn id(&self) -> NodeId
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin 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
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
)