Enum umbra_lang::Type [−][src]
pub enum Type {}Show variants
None, Any, Type, Reference, Number, String, List(Arc<Type>), Map(Arc<Type>, Arc<Type>), Enum(Arc<Vec<(String, Arc<Type>)>>), Struct(Arc<HashableMap<String, Arc<Type>>>), Generic(Arc<Type>, Arc<HashableMap<String, Arc<Type>>>), Function { args: Arc<Vec<(String, Arc<Type>)>>, ret: Arc<Type>, }, Thread(Arc<Type>),
Expand description
A representation of a kind of Value
. Most variants just represent the
corresponding Value
variants.
The below associated functions return cloned Arc
s to defaults.
Variants
Null type, only to be used internally. For external code, use an Option
.
Used by generics to accept any type. This is available as _
but
generally prefer generic
instead.
A pair of the underlying type and a map of generic parameter types.
This doesn’t correspond to a Value
variant since the actual type it
should act as is valid.
Implementations
impl Type
[src]
impl Type
[src]#[must_use]pub fn none() -> Arc<Type>
[src]
#[must_use]pub fn any() -> Arc<Type>
[src]
#[must_use]pub fn ttype() -> Arc<Type>
[src]
#[must_use]pub fn reference() -> Arc<Type>
[src]
#[must_use]pub fn number() -> Arc<Type>
[src]
#[must_use]pub fn string() -> Arc<Type>
[src]
#[must_use]pub fn list() -> Arc<Type>
[src]
#[must_use]pub fn map() -> Arc<Type>
[src]
#[must_use]pub fn tenum() -> Arc<Type>
[src]
#[must_use]pub fn tstruct() -> Arc<Type>
[src]
#[must_use]pub fn generic() -> Arc<Type>
[src]
#[must_use]pub fn function() -> Arc<Type>
[src]
#[must_use]pub fn thread() -> Arc<Type>
[src]
Trait Implementations
impl Ord for Type
[src]
impl Ord for Type
[src]impl PartialOrd<Type> for Type
[src]
impl PartialOrd<Type> for Type
[src]fn partial_cmp(&self, other: &Type) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Type) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Type
[src]
impl StructuralEq for Type
[src]
impl StructuralPartialEq for Type
[src]
Auto Trait Implementations
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more