pub struct ToolContext {
pub schema: String,
pub fingerprint: String,
pub edge_cap: usize,
pub truncated: bool,
pub node: ContextNode,
pub meta: Value,
pub outgoing: BoundedEdges,
pub incoming: BoundedEdges,
}Expand description
A node’s context bundle, bounded for a model-facing tool surface.
The same shape as NodeContext with each edge list replaced by a
BoundedEdges that says how much of it you are looking at.
Fields§
§schema: StringStable schema tag (SCHEMA).
fingerprint: StringFingerprint over the node’s content and its neighbours’ content.
edge_cap: usizeThe cap applied to each direction (TOOL_CONTEXT_EDGE_CAP).
truncated: boolWhether either direction was truncated — the one field a caller has to read to know the bundle is partial.
node: ContextNodeThe subject node.
meta: ValueStructured metadata attached to the node.
outgoing: BoundedEdgesEdges where the subject is the source.
incoming: BoundedEdgesEdges where the subject is the destination.
Trait Implementations§
Source§impl Clone for ToolContext
impl Clone for ToolContext
Source§fn clone(&self) -> ToolContext
fn clone(&self) -> ToolContext
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 ToolContext
impl Debug for ToolContext
Source§impl<'de> Deserialize<'de> for ToolContext
impl<'de> Deserialize<'de> for ToolContext
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 ToolContext
impl PartialEq for ToolContext
Source§impl Serialize for ToolContext
impl Serialize for ToolContext
impl StructuralPartialEq for ToolContext
Auto Trait Implementations§
impl Freeze for ToolContext
impl RefUnwindSafe for ToolContext
impl Send for ToolContext
impl Sync for ToolContext
impl Unpin for ToolContext
impl UnsafeUnpin for ToolContext
impl UnwindSafe for ToolContext
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