pub struct AgentInstructions { /* private fields */ }Expand description
Ordered, non-empty trusted instructions pinned into one agent definition.
Serialized instruction claims are not authority. A trusted registry must authenticate every owner and resolve artifact bytes before making an agent selectable. The collection itself prevents identity ambiguity and unbounded prompt material.
Implementations§
Source§impl AgentInstructions
impl AgentInstructions
Sourcepub const MAX_CONTENT_BYTES: ByteCount
pub const MAX_CONTENT_BYTES: ByteCount
Maximum aggregate resolved instruction content.
Sourcepub fn try_new<I>(values: I) -> Result<Self, AgentInstructionsError>where
I: IntoIterator<Item = Instruction>,
pub fn try_new<I>(values: I) -> Result<Self, AgentInstructionsError>where
I: IntoIterator<Item = Instruction>,
Validates and constructs an ordered non-empty instruction collection.
§Errors
Returns AgentInstructionsError for an empty, duplicate, unsupported,
oversized, or arithmetically unrepresentable collection.
Sourcepub const fn as_slice(&self) -> &[Instruction]
pub const fn as_slice(&self) -> &[Instruction]
Returns the ordered instruction slice.
Sourcepub fn iter(&self) -> Iter<'_, Instruction> ⓘ
pub fn iter(&self) -> Iter<'_, Instruction> ⓘ
Iterates in declared precedence order.
Sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
Returns whether this collection is empty.
Valid constructed values always return false.
Sourcepub const fn content_bytes(&self) -> ByteCount
pub const fn content_bytes(&self) -> ByteCount
Returns aggregate resolved text or artifact bytes.
Trait Implementations§
Source§impl Clone for AgentInstructions
impl Clone for AgentInstructions
Source§impl Debug for AgentInstructions
impl Debug for AgentInstructions
Source§impl<'de> Deserialize<'de> for AgentInstructions
impl<'de> Deserialize<'de> for AgentInstructions
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>,
impl Eq for AgentInstructions
Source§impl<'a> IntoIterator for &'a AgentInstructions
impl<'a> IntoIterator for &'a AgentInstructions
Source§impl JsonSchema for AgentInstructions
impl JsonSchema for AgentInstructions
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more