Enum golem_wasm_ast::analysis::AnalysedType
source · pub enum AnalysedType {
Show 22 variants
Bool,
S8,
U8,
S16,
U16,
S32,
U32,
S64,
U64,
F32,
F64,
Chr,
Str,
List(Box<AnalysedType>),
Tuple(Vec<AnalysedType>),
Record(Vec<(String, AnalysedType)>),
Flags(Vec<String>),
Enum(Vec<String>),
Option(Box<AnalysedType>),
Result {
ok: Option<Box<AnalysedType>>,
error: Option<Box<AnalysedType>>,
},
Variant(Vec<(String, Option<AnalysedType>)>),
Resource {
id: AnalysedResourceId,
resource_mode: AnalysedResourceMode,
},
}
Variants§
Bool
S8
U8
S16
U16
S32
U32
S64
U64
F32
F64
Chr
Str
List(Box<AnalysedType>)
Tuple(Vec<AnalysedType>)
Record(Vec<(String, AnalysedType)>)
Flags(Vec<String>)
Enum(Vec<String>)
Option(Box<AnalysedType>)
Result
Variant(Vec<(String, Option<AnalysedType>)>)
Resource
Trait Implementations§
source§impl Clone for AnalysedType
impl Clone for AnalysedType
source§fn clone(&self) -> AnalysedType
fn clone(&self) -> AnalysedType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AnalysedType
impl Debug for AnalysedType
source§impl From<&PrimitiveValueType> for AnalysedType
impl From<&PrimitiveValueType> for AnalysedType
source§fn from(value: &PrimitiveValueType) -> Self
fn from(value: &PrimitiveValueType) -> Self
Converts to this type from the input type.
source§impl PartialEq for AnalysedType
impl PartialEq for AnalysedType
source§fn eq(&self, other: &AnalysedType) -> bool
fn eq(&self, other: &AnalysedType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl WasmType for AnalysedType
impl WasmType for AnalysedType
source§fn kind(&self) -> WasmTypeKind
fn kind(&self) -> WasmTypeKind
Returns the
WasmTypeKind
of this type.source§fn list_element_type(&self) -> Option<Self>
fn list_element_type(&self) -> Option<Self>
source§fn record_fields(&self) -> Box<dyn Iterator<Item = (Cow<'_, str>, Self)> + '_>
fn record_fields(&self) -> Box<dyn Iterator<Item = (Cow<'_, str>, Self)> + '_>
Returns an iterator of the record’s field names and Types. The
iterator will be empty iff
self
is not a record type. Read moresource§fn tuple_element_types(&self) -> Box<dyn Iterator<Item = Self> + '_>
fn tuple_element_types(&self) -> Box<dyn Iterator<Item = Self> + '_>
Returns an iterator of the tuple’s field Types. The iterator will be
empty iff
self
is not a tuple type. Read moresource§fn variant_cases(
&self,
) -> Box<dyn Iterator<Item = (Cow<'_, str>, Option<Self>)> + '_>
fn variant_cases( &self, ) -> Box<dyn Iterator<Item = (Cow<'_, str>, Option<Self>)> + '_>
Returns an iterator of the variant’s case names and optional payload
Types. The iterator will be empty iff
self
is not a tuple type. Read moresource§fn enum_cases(&self) -> Box<dyn Iterator<Item = Cow<'_, str>> + '_>
fn enum_cases(&self) -> Box<dyn Iterator<Item = Cow<'_, str>> + '_>
Returns an iterator of the enum’s case names. The iterator will be
empty iff
self
is not an enum type. Read moresource§fn option_some_type(&self) -> Option<Self>
fn option_some_type(&self) -> Option<Self>
impl Eq for AnalysedType
impl StructuralPartialEq for AnalysedType
Auto Trait Implementations§
impl Freeze for AnalysedType
impl RefUnwindSafe for AnalysedType
impl Send for AnalysedType
impl Sync for AnalysedType
impl Unpin for AnalysedType
impl UnwindSafe for AnalysedType
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.