pub struct ContextPacket {
pub id: Option<String>,
pub source: ContextSource,
pub title: Option<String>,
pub content: String,
pub priority: i32,
pub metadata: Value,
}Expand description
A unit of external context injected into the agent’s conversation.
Context packets let clients supply information from files, canvas nodes, study blocks, memory searches, and other sources without the engine needing to know about the client’s data model.
Fields§
§id: Option<String>Optional client-assigned identifier for deduplication or reference.
source: ContextSourceThe origin category of this packet.
title: Option<String>Optional short title for display or logging.
content: StringThe text content to inject into the conversation.
priority: i32Ordering priority; higher values are rendered first in the context block.
metadata: ValueArbitrary metadata the client wants to attach (ignored by the engine).
Trait Implementations§
Source§impl Clone for ContextPacket
impl Clone for ContextPacket
Source§impl Debug for ContextPacket
impl Debug for ContextPacket
Source§impl<'de> Deserialize<'de> for ContextPacket
impl<'de> Deserialize<'de> for ContextPacket
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
Source§impl PartialEq for ContextPacket
impl PartialEq for ContextPacket
Source§impl Serialize for ContextPacket
impl Serialize for ContextPacket
impl StructuralPartialEq for ContextPacket
Auto Trait Implementations§
impl Freeze for ContextPacket
impl RefUnwindSafe for ContextPacket
impl Send for ContextPacket
impl Sync for ContextPacket
impl Unpin for ContextPacket
impl UnsafeUnpin for ContextPacket
impl UnwindSafe for ContextPacket
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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