pub struct ValEncoder<'a, T: 'static, W> {
pub store: StoreContextMut<'a, T>,
pub ty: &'a Type,
pub resources: &'a [ResourceType],
pub io_streams: &'a [ResourceType],
pub deferred: Option<Box<dyn FnOnce(W) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Send>>,
}Fields§
§store: StoreContextMut<'a, T>§ty: &'a Type§resources: &'a [ResourceType]§io_streams: &'a [ResourceType]Resource types bridged to wRPC stream<u8> (wasi:io input-stream/
output-stream), identified by their possibly-uninstantiated type.
deferred: Option<Box<dyn FnOnce(W) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> + Send>>Implementations§
Source§impl<T, W> ValEncoder<'_, T, W>
impl<T, W> ValEncoder<'_, T, W>
pub fn new<'a>( store: StoreContextMut<'a, T>, ty: &'a Type, resources: &'a [ResourceType], io_streams: &'a [ResourceType], ) -> ValEncoder<'a, T, W>
pub fn with_type<'a>(&'a mut self, ty: &'a Type) -> ValEncoder<'a, T, W>
Trait Implementations§
Source§impl<T, W> Encoder<&Val> for ValEncoder<'_, T, W>
impl<T, W> Encoder<&Val> for ValEncoder<'_, T, W>
Auto Trait Implementations§
impl<'a, T, W> !RefUnwindSafe for ValEncoder<'a, T, W>
impl<'a, T, W> !Sync for ValEncoder<'a, T, W>
impl<'a, T, W> !UnwindSafe for ValEncoder<'a, T, W>
impl<'a, T, W> Freeze for ValEncoder<'a, T, W>
impl<'a, T, W> Send for ValEncoder<'a, T, W>where
T: Send,
impl<'a, T, W> Unpin for ValEncoder<'a, T, W>
impl<'a, T, W> UnsafeUnpin for ValEncoder<'a, T, W>
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