Enum ExternType
pub enum ExternType {
Function(FunctionType),
Global(GlobalType),
Table(TableType),
Memory(MemoryType),
Tag(TagType),
}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.
Tag(TagType)
This external type is the type of a WebAssembly tag.
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.
pub fn table(&self) -> Option<&TableType>
pub fn table(&self) -> Option<&TableType>
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,
runtime_size: Option<u32>,
) -> bool
pub fn is_compatible_with( &self, other: &ExternType, runtime_size: Option<u32>, ) -> bool
Check if two externs are compatible
Trait Implementations§
§impl Archive for ExternTypewhere
FunctionType: Archive,
GlobalType: Archive,
TableType: Archive,
MemoryType: Archive,
TagType: Archive,
impl Archive for ExternTypewhere
FunctionType: Archive,
GlobalType: Archive,
TableType: Archive,
MemoryType: Archive,
TagType: Archive,
§type Resolver = ExternTypeResolver
type Resolver = ExternTypeResolver
§fn resolve(
&self,
resolver: <ExternType as Archive>::Resolver,
out: Place<<ExternType as Archive>::Archived>,
)
fn resolve( &self, resolver: <ExternType as Archive>::Resolver, out: Place<<ExternType as Archive>::Archived>, )
§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
serialize. Read more§impl Clone for ExternType
impl Clone for ExternType
§fn clone(&self) -> ExternType
fn clone(&self) -> ExternType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ExternType
impl Debug for ExternType
§impl<'de> Deserialize<'de> for ExternType
impl<'de> Deserialize<'de> for ExternType
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExternType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExternType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl<__D> Deserialize<ExternType, __D> for <ExternType as Archive>::Archivedwhere
__D: Fallible + ?Sized,
FunctionType: Archive,
<FunctionType as Archive>::Archived: Deserialize<FunctionType, __D>,
GlobalType: Archive,
<GlobalType as Archive>::Archived: Deserialize<GlobalType, __D>,
TableType: Archive,
<TableType as Archive>::Archived: Deserialize<TableType, __D>,
MemoryType: Archive,
<MemoryType as Archive>::Archived: Deserialize<MemoryType, __D>,
TagType: Archive,
<TagType as Archive>::Archived: Deserialize<TagType, __D>,
impl<__D> Deserialize<ExternType, __D> for <ExternType as Archive>::Archivedwhere
__D: Fallible + ?Sized,
FunctionType: Archive,
<FunctionType as Archive>::Archived: Deserialize<FunctionType, __D>,
GlobalType: Archive,
<GlobalType as Archive>::Archived: Deserialize<GlobalType, __D>,
TableType: Archive,
<TableType as Archive>::Archived: Deserialize<TableType, __D>,
MemoryType: Archive,
<MemoryType as Archive>::Archived: Deserialize<MemoryType, __D>,
TagType: Archive,
<TagType as Archive>::Archived: Deserialize<TagType, __D>,
§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<ExternType, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<ExternType, <__D as Fallible>::Error>
§impl Hash for ExternType
impl Hash for ExternType
§impl PartialEq for ExternType
impl PartialEq for ExternType
§impl<__S> Serialize<__S> for ExternTypewhere
__S: Fallible + ?Sized,
FunctionType: Serialize<__S>,
GlobalType: Serialize<__S>,
TableType: Serialize<__S>,
MemoryType: Serialize<__S>,
TagType: Serialize<__S>,
impl<__S> Serialize<__S> for ExternTypewhere
__S: Fallible + ?Sized,
FunctionType: Serialize<__S>,
GlobalType: Serialize<__S>,
TableType: Serialize<__S>,
MemoryType: Serialize<__S>,
TagType: Serialize<__S>,
§fn serialize(
&self,
serializer: &mut __S,
) -> Result<<ExternType as Archive>::Resolver, <__S as Fallible>::Error>
fn serialize( &self, serializer: &mut __S, ) -> Result<<ExternType as Archive>::Resolver, <__S as Fallible>::Error>
§impl Serialize for ExternType
impl Serialize for ExternType
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for ExternType
impl StructuralPartialEq for ExternType
Auto Trait Implementations§
impl Freeze for ExternType
impl RefUnwindSafe for ExternType
impl Send for ExternType
impl Sync for ExternType
impl Unpin for ExternType
impl UnwindSafe for ExternType
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read more§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more