pub struct DefaultHostContextProvider;Expand description
Default host context provider for testing
Trait Implementations§
Source§impl HostContextProvider for DefaultHostContextProvider
impl HostContextProvider for DefaultHostContextProvider
Source§fn create_context(
&self,
plugin_id: &str,
capabilities: &ManifestCapabilities,
) -> HostFunctionContext
fn create_context( &self, plugin_id: &str, capabilities: &ManifestCapabilities, ) -> HostFunctionContext
Create a host context for a plugin
Source§fn read(
&self,
_ctx: &HostFunctionContext,
_table_id: u32,
_row_id: u64,
) -> HostCallResult
fn read( &self, _ctx: &HostFunctionContext, _table_id: u32, _row_id: u64, ) -> HostCallResult
Execute a read operation
Source§fn write(
&self,
_ctx: &HostFunctionContext,
_table_id: u32,
_row_id: u64,
_data: &[u8],
) -> HostCallResult
fn write( &self, _ctx: &HostFunctionContext, _table_id: u32, _row_id: u64, _data: &[u8], ) -> HostCallResult
Execute a write operation
Source§fn vector_search(
&self,
_ctx: &HostFunctionContext,
_index: &str,
_vector: &[f32],
_top_k: u32,
) -> HostCallResult
fn vector_search( &self, _ctx: &HostFunctionContext, _index: &str, _vector: &[f32], _top_k: u32, ) -> HostCallResult
Execute vector search
Auto Trait Implementations§
impl Freeze for DefaultHostContextProvider
impl RefUnwindSafe for DefaultHostContextProvider
impl Send for DefaultHostContextProvider
impl Sync for DefaultHostContextProvider
impl Unpin for DefaultHostContextProvider
impl UnsafeUnpin for DefaultHostContextProvider
impl UnwindSafe for DefaultHostContextProvider
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