pub trait PortableToolEmbedding: PortableTool {
type InitError: Error + WasmCompatSend + WasmCompatSync + 'static;
type Context: for<'de> Deserialize<'de> + Serialize;
type State: WasmCompatSend;
// Required methods
fn embedding_docs(&self) -> Vec<String>;
fn context(&self) -> Self::Context;
fn init(
state: Self::State,
context: Self::Context,
) -> Result<Self, Self::InitError>;
}Expand description
A portable tool that can be embedded and reconstructed for discovery.
Required Associated Types§
Sourcetype InitError: Error + WasmCompatSend + WasmCompatSync + 'static
type InitError: Error + WasmCompatSend + WasmCompatSync + 'static
Failure returned while reconstructing the typed implementation.
Sourcetype Context: for<'de> Deserialize<'de> + Serialize
type Context: for<'de> Deserialize<'de> + Serialize
Serializable reconstruction data.
Sourcetype State: WasmCompatSend
type State: WasmCompatSend
Runtime initialization state supplied by the authoring integration.
Required Methods§
Sourcefn embedding_docs(&self) -> Vec<String>
fn embedding_docs(&self) -> Vec<String>
Documents used by a discovery implementation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".