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 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more