pub struct ReproducibleWasmCodecType<E: WasmEngine>{ /* private fields */ }
Expand description
Type object for a codec instantiated inside a WebAssembly component.
Implementations§
Source§impl<E: WasmEngine> ReproducibleWasmCodecType<E>
impl<E: WasmEngine> ReproducibleWasmCodecType<E>
Sourcepub fn new(
engine: E,
wasm_component: impl Into<Vec<u8>>,
) -> Result<Self, ReproducibleWasmCodecError>
pub fn new( engine: E, wasm_component: impl Into<Vec<u8>>, ) -> Result<Self, ReproducibleWasmCodecError>
Load a DynCodecType
from a binary wasm_component
, which will be
executed in the provided core WebAssembly engine
.
§Errors
Errors if the wasm_component
does not export the numcodecs:abc/codec
interface or if interacting with the component fails.
Trait Implementations§
Source§impl<E: WasmEngine> DynCodecType for ReproducibleWasmCodecType<E>
impl<E: WasmEngine> DynCodecType for ReproducibleWasmCodecType<E>
Source§type Codec = ReproducibleWasmCodec<E>
type Codec = ReproducibleWasmCodec<E>
Type of the instances of this codec type object.
Source§fn codec_from_config<'de, D: Deserializer<'de>>(
&self,
config: D,
) -> Result<Self::Codec, D::Error>
fn codec_from_config<'de, D: Deserializer<'de>>( &self, config: D, ) -> Result<Self::Codec, D::Error>
Instantiate a codec of this type from a serialized
config
uration. Read moreSource§fn codec_config_schema(&self) -> Schema
fn codec_config_schema(&self) -> Schema
JSON schema for the codec’s configuration.
Auto Trait Implementations§
impl<E> Freeze for ReproducibleWasmCodecType<E>
impl<E> !RefUnwindSafe for ReproducibleWasmCodecType<E>
impl<E> Send for ReproducibleWasmCodecType<E>
impl<E> Sync for ReproducibleWasmCodecType<E>
impl<E> Unpin for ReproducibleWasmCodecType<E>
impl<E> !UnwindSafe for ReproducibleWasmCodecType<E>
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