pub struct ContextFragment {
pub lane: ContextLane,
pub source: String,
pub content: String,
pub estimated_tokens: u32,
}Expand description
One accountable context fragment.
Fields§
§lane: ContextLaneContext lane this fragment belongs to.
source: StringHuman-readable source path, URL, event id, or synthetic label.
content: StringText injected into the model prompt.
estimated_tokens: u32Estimated token count used for budget checks.
Trait Implementations§
Source§impl Clone for ContextFragment
impl Clone for ContextFragment
Source§fn clone(&self) -> ContextFragment
fn clone(&self) -> ContextFragment
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 ContextFragment
impl Debug for ContextFragment
Source§impl<'de> Deserialize<'de> for ContextFragment
impl<'de> Deserialize<'de> for ContextFragment
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
impl Eq for ContextFragment
Source§impl PartialEq for ContextFragment
impl PartialEq for ContextFragment
Source§impl Serialize for ContextFragment
impl Serialize for ContextFragment
impl StructuralPartialEq for ContextFragment
Auto Trait Implementations§
impl Freeze for ContextFragment
impl RefUnwindSafe for ContextFragment
impl Send for ContextFragment
impl Sync for ContextFragment
impl Unpin for ContextFragment
impl UnsafeUnpin for ContextFragment
impl UnwindSafe for ContextFragment
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