[−][src]Enum substrate_wasmtime::AnyRef
Represents an opaque reference to any data within WebAssembly.
Variants
A reference to no data.
A reference to data stored internally in wasmtime
.
A reference to data located outside of wasmtime
.
Implementations
impl AnyRef
[src]
pub fn new(data: Box<dyn Any>) -> Self
[src]
Creates a new instance of AnyRef
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 AnyRef::Other
.
pub fn ptr_eq(&self, other: &AnyRef) -> bool
[src]
Returns true if the two AnyRef<T>
's point to the same value (not just
values that compare as equal).
pub fn host_info(&self) -> Option<RefMut<Box<dyn Any>>>
[src]
Returns a mutable reference to the host information if available.
Panics
Panics if AnyRef
is already borrowed or AnyRef
is Null
.
pub fn set_host_info(&self, info: Option<Box<dyn Any>>)
[src]
Sets the host information for an AnyRef
.
Panics
Panics if AnyRef
is already borrowed or AnyRef
is Null
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for AnyRef
impl !Send for AnyRef
impl !Sync for AnyRef
impl Unpin for AnyRef
impl !UnwindSafe for AnyRef
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,
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> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,