pub struct ContextInjection { /* private fields */ }Expand description
Normalized, runtime-neutral context payload supplied to the dispatcher by its host.
Implementations§
Source§impl ContextInjection
impl ContextInjection
Sourcepub fn from_ir(
ir: &WarbleIr,
mode: ContextInjectionMode,
knowledge: Option<String>,
) -> Self
pub fn from_ir( ir: &WarbleIr, mode: ContextInjectionMode, knowledge: Option<String>, ) -> Self
Build the source-neutral payload from compiled IR plus host-supplied knowledge. knowledge
is consumed only in schema+knowledge; callers should not read it for schema-only.
pub fn mode(&self) -> ContextInjectionMode
Sourcepub fn introspected(&self) -> bool
pub fn introspected(&self) -> bool
Whether the bound context described itself at all. false means the compiled IR carries no
resolved block — the layer is elsewhere — and callers must not present its emptiness as
knowledge about that layer.
pub fn prompt_section(&self) -> String
pub fn report(&self) -> ContextInjectionReport
Trait Implementations§
Source§impl Clone for ContextInjection
impl Clone for ContextInjection
Source§fn clone(&self) -> ContextInjection
fn clone(&self) -> ContextInjection
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 Debug for ContextInjection
impl Debug for ContextInjection
impl Eq for ContextInjection
Source§impl PartialEq for ContextInjection
impl PartialEq for ContextInjection
impl StructuralPartialEq for ContextInjection
Auto Trait Implementations§
impl Freeze for ContextInjection
impl RefUnwindSafe for ContextInjection
impl Send for ContextInjection
impl Sync for ContextInjection
impl Unpin for ContextInjection
impl UnsafeUnpin for ContextInjection
impl UnwindSafe for ContextInjection
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.