Enum gluon_base::kind::Kind
source · pub enum Kind {
Hole,
Error,
Variable(u32),
Type,
Row,
Function(ArcKind, ArcKind),
}
Expand description
Kind representation
All types in gluon has a kind. Most types encountered are of the Type
kind which
includes things like Int
, String
and Option Int
. There are however other types
which are said to be “higher kinded” and these use the Function
(a -> b) variant.
These types include Option
and (->)
which both have the kind Type -> Type -> Type
as well as Functor
which has the kind Type -> Type -> Type
.
Variants§
Hole
Error
Variable(u32)
Representation for a kind which is yet to be inferred.
Type
The simplest possible kind. All values in a program have this kind.
Row
Kinds of rows (for polymorphic records).
Function(ArcKind, ArcKind)
Constructor which takes two kinds, taking the first as argument and returning the second.
Implementations§
Trait Implementations§
source§impl<'de, S> DeserializeState<'de, S> for Kind
impl<'de, S> DeserializeState<'de, S> for Kind
source§fn deserialize_state<__D>(
__seed: &mut S,
__deserializer: __D
) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize_state<__D>(
__seed: &mut S,
__deserializer: __D
) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserializes
Self
using seed
and the deserializer
source§impl PartialEq for Kind
impl PartialEq for Kind
source§impl SerializeState<SeSeed> for Kind
impl SerializeState<SeSeed> for Kind
source§fn serialize_state<__S>(
&self,
__serializer: __S,
__seed: &SeSeed
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
fn serialize_state<__S>(
&self,
__serializer: __S,
__seed: &SeSeed
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Serializes
self
impl Eq for Kind
impl StructuralEq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
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