pub struct ContextBlock {
pub text: String,
pub token_count: usize,
pub facts_included: usize,
pub facts_omitted: usize,
pub tier_breakdown: HashMap<String, usize>,
}Expand description
The assembled context block returned by ContextBuilder::build().
Fields§
§text: StringFormatted text ready for prompt injection.
token_count: usizeEstimated token count of the text field.
facts_included: usizeNumber of facts included in the output.
facts_omitted: usizeNumber of facts that were retrieved but omitted due to budget.
tier_breakdown: HashMap<String, usize>Breakdown of included facts by tier.
Trait Implementations§
Source§impl Clone for ContextBlock
impl Clone for ContextBlock
Source§fn clone(&self) -> ContextBlock
fn clone(&self) -> ContextBlock
Returns a duplicate of the value. Read more
1.0.0 · 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 ContextBlock
impl Debug for ContextBlock
Auto Trait Implementations§
impl Freeze for ContextBlock
impl RefUnwindSafe for ContextBlock
impl Send for ContextBlock
impl Sync for ContextBlock
impl Unpin for ContextBlock
impl UnsafeUnpin for ContextBlock
impl UnwindSafe for ContextBlock
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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