Enum holochain_wasmer_host::prelude::ExternType [−]
pub enum ExternType { Function(FunctionType), Global(GlobalType), Table(TableType), Memory(MemoryType), }
Expand description
A list of all possible types which can be externally referenced from a WebAssembly module.
This list can be found in ImportType
or ExportType
, so these types
can either be imported or exported.
Variants
Function(FunctionType)
This external type is the type of a WebAssembly function.
Global(GlobalType)
This external type is the type of a WebAssembly global.
Table(TableType)
This external type is the type of a WebAssembly table.
Memory(MemoryType)
This external type is the type of a WebAssembly memory.
Implementations
impl ExternType
impl ExternType
pub fn func(&self) -> Option<&FunctionType>
pub fn func(&self) -> Option<&FunctionType>
Attempt to return the underlying type of this external type,
returning None
if it is a different type.
pub fn unwrap_func(&self) -> &FunctionType
pub fn unwrap_func(&self) -> &FunctionType
Returns the underlying descriptor of this ExternType
, panicking
if it is a different type.
Panics
Panics if self
is not of the right type.
pub fn global(&self) -> Option<&GlobalType>
pub fn global(&self) -> Option<&GlobalType>
Attempt to return the underlying type of this external type,
returning None
if it is a different type.
pub fn unwrap_global(&self) -> &GlobalType
pub fn unwrap_global(&self) -> &GlobalType
Returns the underlying descriptor of this ExternType
, panicking
if it is a different type.
Panics
Panics if self
is not of the right type.
Attempt to return the underlying type of this external type,
returning None
if it is a different type.
pub fn unwrap_table(&self) -> &TableType
pub fn unwrap_table(&self) -> &TableType
Returns the underlying descriptor of this ExternType
, panicking
if it is a different type.
Panics
Panics if self
is not of the right type.
pub fn memory(&self) -> Option<&MemoryType>
pub fn memory(&self) -> Option<&MemoryType>
Attempt to return the underlying type of this external type,
returning None
if it is a different type.
pub fn unwrap_memory(&self) -> &MemoryType
pub fn unwrap_memory(&self) -> &MemoryType
Returns the underlying descriptor of this ExternType
, panicking
if it is a different type.
Panics
Panics if self
is not of the right type.
pub fn is_compatible_with(&self, other: &ExternType) -> bool
pub fn is_compatible_with(&self, other: &ExternType) -> bool
Check if two externs are compatible
Trait Implementations
impl Clone for ExternType
impl Clone for ExternType
pub fn clone(&self) -> ExternType
pub fn clone(&self) -> ExternType
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl Debug for ExternType
impl Debug for ExternType
impl<'de> Deserialize<'de> for ExternType
impl<'de> Deserialize<'de> for ExternType
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<ExternType, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<ExternType, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Hash for ExternType
impl Hash for ExternType
impl PartialEq<ExternType> for ExternType
impl PartialEq<ExternType> for ExternType
pub fn eq(&self, other: &ExternType) -> bool
pub fn eq(&self, other: &ExternType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &ExternType) -> bool
pub fn ne(&self, other: &ExternType) -> bool
This method tests for !=
.
impl Serialize for ExternType
impl Serialize for ExternType
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for ExternType
impl StructuralEq for ExternType
impl StructuralPartialEq for ExternType
Auto Trait Implementations
impl RefUnwindSafe for ExternType
impl Send for ExternType
impl Sync for ExternType
impl Unpin for ExternType
impl UnwindSafe for ExternType
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V