Skip to main content

ExecutionContext

Struct ExecutionContext 

Source
pub struct ExecutionContext {
    pub document_store: Option<Arc<dyn DocumentStore>>,
    pub inverted_index: Option<Arc<dyn InvertedIndex>>,
    pub vector_indexes: BTreeMap<FieldName, Arc<dyn VectorIndex>>,
    pub stats: Option<IndexStats>,
    pub graph: Option<Arc<dyn GraphNeighborLookup>>,
}
Expand description

Storage handles passed to every operator’s execute call.

Holding Arc<dyn ...> rather than borrows keeps the operator tree independent of how the engine owns its stores. The trade-off is one Arc::clone per operator at engine boundary; per-operator dispatch remains a single virtual call.

Fields§

§document_store: Option<Arc<dyn DocumentStore>>§inverted_index: Option<Arc<dyn InvertedIndex>>§vector_indexes: BTreeMap<FieldName, Arc<dyn VectorIndex>>§stats: Option<IndexStats>§graph: Option<Arc<dyn GraphNeighborLookup>>

Optional named graph (label-only neighbor lookup) for the graph-aware deep-fusion layers (Propagate, Conv, Pool). Held as a generic neighbor-lookup callback so this crate stays independent of uqa-graph.

Implementations§

Source§

impl ExecutionContext

Source

pub fn new() -> Self

Source

pub fn with_inverted_index(self, idx: Arc<dyn InvertedIndex>) -> Self

Source

pub fn with_document_store(self, ds: Arc<dyn DocumentStore>) -> Self

Source

pub fn with_vector_index( self, field: impl Into<FieldName>, idx: Arc<dyn VectorIndex>, ) -> Self

Source

pub fn with_stats(self, stats: IndexStats) -> Self

Source

pub fn with_graph(self, graph: Arc<dyn GraphNeighborLookup>) -> Self

Trait Implementations§

Source§

impl Clone for ExecutionContext

Source§

fn clone(&self) -> ExecutionContext

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for ExecutionContext

Source§

fn default() -> ExecutionContext

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.