pub struct ContextSlice {
pub target: NodeInfo,
pub nodes: Vec<ContextNode>,
pub total_tokens: usize,
pub max_tokens: usize,
pub truncation_reason: TruncationReason,
pub query_time_ms: u64,
}Expand description
Result of a context slicing operation.
Fields§
§target: NodeInfoThe target node being queried.
nodes: Vec<ContextNode>Nodes included in the context, ordered by relevance.
total_tokens: usizeTotal estimated tokens in this slice.
max_tokens: usizeMaximum tokens that were allowed.
truncation_reason: TruncationReasonWhy slicing stopped.
query_time_ms: u64Query time in milliseconds.
Implementations§
Source§impl ContextSlice
impl ContextSlice
pub fn pinned_only(&self) -> Vec<&ContextNode>
Trait Implementations§
Source§impl Debug for ContextSlice
impl Debug for ContextSlice
Source§impl<'de> Deserialize<'de> for ContextSlice
impl<'de> Deserialize<'de> for ContextSlice
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContextSlice
impl RefUnwindSafe for ContextSlice
impl Send for ContextSlice
impl Sync for ContextSlice
impl Unpin for ContextSlice
impl UnwindSafe for ContextSlice
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