pub struct ContextCompiler;Expand description
Compiles allowlisted structured runtime state into a deterministic context snapshot.
Public callers must compile from a session-owned snapshot, not from an arbitrary entry list.
ⓘ
use merry_runtime::{ContextCompiler, ContextEntry};
let compiler = ContextCompiler::new();
let entries: Vec<ContextEntry> = Vec::new();
let _ = compiler.compile(entries);Implementations§
Source§impl ContextCompiler
impl ContextCompiler
Sourcepub fn compile(
&self,
snapshot: &SessionContextSnapshot,
) -> Result<CompiledContext, ContextError>
pub fn compile( &self, snapshot: &SessionContextSnapshot, ) -> Result<CompiledContext, ContextError>
Compiles structured context entries deterministically.
Output ordering is deterministic for a given snapshot. The resulting
CompiledContext is a runtime-owned intermediate, not a stable prompt
format for provider adapters.
Trait Implementations§
Source§impl Debug for ContextCompiler
impl Debug for ContextCompiler
Auto Trait Implementations§
impl Forget for ContextCompiler
impl Freeze for ContextCompiler
impl Move for ContextCompiler
impl RefUnwindSafe for ContextCompiler
impl Send for ContextCompiler
impl Sync for ContextCompiler
impl Unpin for ContextCompiler
impl UnsafeUnpin for ContextCompiler
impl UnwindSafe for ContextCompiler
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