pub enum Type {
Any,
I64,
Bool,
String,
Function(Rc<FunctionType>),
Enum(Rc<EnumType>),
Option(Rc<ComplexType>),
Mut(Rc<ComplexType>),
Type,
Unit,
}Expand description
The type of a singular espy values.
This enum does not represent the type of tuples;
for that, see ComplexType
Type itself is a type, Type::Type, because it may appear within an espy value.
Note that Value::type_of returns Type::Any for Value::Borrow
and Value::Owned.
Variants§
Any
Any is the type of a value with unknown capabilities.
Any is the type of all external values because they have arbitrary, unknowable properties. This means that external values must be casted to trait objects to interact with them.
I64
Bool
String
Function(Rc<FunctionType>)
Enum(Rc<EnumType>)
Option(Rc<ComplexType>)
Mut(Rc<ComplexType>)
Type
The type of types.
Unit
Trait Implementations§
Source§impl From<Type> for ComplexType
impl From<Type> for ComplexType
Source§fn from(value: Type) -> ComplexType
fn from(value: Type) -> ComplexType
Converts to this type from the input type.
impl Eq 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 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