Enum wasmer_types::ExternRef [−][src]
Represents an opaque reference to any data within WebAssembly.
Variants
A reference to no data.
A reference to data stored internally.
A reference to data located outside.
Implementations
impl ExternRef[src]
pub fn new(data: Box<dyn Any>) -> Self[src]
Creates a new instance of ExternRef from Box<dyn Any>.
pub fn null() -> Self[src]
Creates a Null reference.
pub fn data(&self) -> Ref<'_, Box<dyn Any>>[src]
Returns the data stored in the reference if available.
Panics
Panics if the variant isn't ExternRef::Other.
pub fn ptr_eq(&self, other: &Self) -> bool[src]
Returns true if the two ExternRef<T>'s point to the same value (not just
values that compare as equal).
pub fn host_info(&self) -> Option<RefMut<'_, Box<dyn HostInfo>>>[src]
Returns a mutable reference to the host information if available.
Panics
Panics if ExternRef is already borrowed or ExternRef is Null.
pub fn set_host_info(&self, info: Option<Box<dyn HostInfo>>)[src]
Sets the host information for an ExternRef.
Panics
Panics if ExternRef is already borrowed or ExternRef is Null.
Trait Implementations
impl Clone for ExternRef[src]
impl Debug for ExternRef[src]
impl Eq for ExternRef[src]
impl<T> From<ExternRef> for Value<T>[src]
impl Hash for ExternRef[src]
fn hash<H: Hasher>(&self, _state: &mut H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl PartialEq<ExternRef> for ExternRef[src]
Auto Trait Implementations
impl !RefUnwindSafe for ExternRef[src]
impl !Send for ExternRef[src]
impl !Sync for ExternRef[src]
impl Unpin for ExternRef[src]
impl !UnwindSafe for ExternRef[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,