pub struct ContextCompiler<T = BytesTokenEstimator> { /* private fields */ }Implementations§
Source§impl<T> ContextCompiler<T>where
T: TokenEstimator,
impl<T> ContextCompiler<T>where
T: TokenEstimator,
pub const fn new(estimator: T) -> Self
Sourcepub fn compile(
&self,
projection: &MemoryProjection,
request: &ContextRequest,
) -> Result<ContextBundle>
pub fn compile( &self, projection: &MemoryProjection, request: &ContextRequest, ) -> Result<ContextBundle>
Compiles a deterministic, evidence-carrying graph within a hard budget.
§Errors
Returns an error for missing seeds, graph failures, or an undersized budget that cannot hold the requested seed nodes.
Source§impl<T> ContextCompiler<T>where
T: TokenEstimator,
impl<T> ContextCompiler<T>where
T: TokenEstimator,
Sourcepub fn compile_with_retrieval(
&self,
projection: &MemoryProjection,
request: &ContextRequest,
query: &RetrievalQuery,
providers: &[&dyn RetrievalProvider],
) -> Result<RetrievedContextBundle>
pub fn compile_with_retrieval( &self, projection: &MemoryProjection, request: &ContextRequest, query: &RetrievalQuery, providers: &[&dyn RetrievalProvider], ) -> Result<RetrievedContextBundle>
Resolves free text into exact graph seeds and compiles their context.
Providers can be lexical, BM25, vector, or hybrid implementations from separate crates. Rank fusion is deterministic and provider scores never need to share a scale.
§Errors
Returns provider, missing-entity, scope, graph, or budget failures.
Trait Implementations§
Source§impl<T: Clone> Clone for ContextCompiler<T>
impl<T: Clone> Clone for ContextCompiler<T>
Source§fn clone(&self) -> ContextCompiler<T>
fn clone(&self) -> ContextCompiler<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for ContextCompiler<T>
impl<T: Debug> Debug for ContextCompiler<T>
Source§impl Default for ContextCompiler<BytesTokenEstimator>
impl Default for ContextCompiler<BytesTokenEstimator>
Auto Trait Implementations§
impl<T> Freeze for ContextCompiler<T>where
T: Freeze,
impl<T> RefUnwindSafe for ContextCompiler<T>where
T: RefUnwindSafe,
impl<T> Send for ContextCompiler<T>where
T: Send,
impl<T> Sync for ContextCompiler<T>where
T: Sync,
impl<T> Unpin for ContextCompiler<T>where
T: Unpin,
impl<T> UnsafeUnpin for ContextCompiler<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ContextCompiler<T>where
T: UnwindSafe,
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