pub struct TypedAgentDefinition<I, O> { /* private fields */ }Expand description
Generated typed schemas plus an immutable agent descriptor, before binding to one complete offline schema registry.
Implementations§
Source§impl<I, O> TypedAgentDefinition<I, O>
impl<I, O> TypedAgentDefinition<I, O>
Sourcepub const fn descriptor(&self) -> &AgentDescriptor
pub const fn descriptor(&self) -> &AgentDescriptor
Returns the immutable provider-neutral descriptor.
Sourcepub const fn input_schema_document(&self) -> &Value
pub const fn input_schema_document(&self) -> &Value
Returns the generated JSON Schema 2020-12 input document.
Sourcepub const fn output_schema_document(&self) -> &Value
pub const fn output_schema_document(&self) -> &Value
Returns the generated JSON Schema 2020-12 output document.
Sourcepub fn register_schemas(
&self,
registry: JsonSchemaRegistryBuilder,
) -> Result<JsonSchemaRegistryBuilder, AgentSchemaRegistrationError>
pub fn register_schemas( &self, registry: JsonSchemaRegistryBuilder, ) -> Result<JsonSchemaRegistryBuilder, AgentSchemaRegistrationError>
Registers both generated schema resources in a startup-only registry builder.
The builder is moved in and returned only after both registrations succeed, so a caller can never observe a partially installed pair.
§Errors
Returns AgentSchemaRegistrationError when either generated resource
conflicts with, or exceeds the limits of, the registry.
Sourcepub fn bind(
self,
registry: Arc<JsonSchemaRegistry>,
) -> Result<TypedAgent<I, O>, TypedAgentBindError>
pub fn bind( self, registry: Arc<JsonSchemaRegistry>, ) -> Result<TypedAgent<I, O>, TypedAgentBindError>
Binds this definition to an immutable offline registry and validates every agent, tool, and provider-profile schema before admission begins.
§Errors
Returns TypedAgentBindError for any missing schema resource,
structurally unsafe schema document, or provider-profile rejection.
Trait Implementations§
Auto Trait Implementations§
impl<I, O> Forget for TypedAgentDefinition<I, O>
impl<I, O> Freeze for TypedAgentDefinition<I, O>
impl<I, O> Move for TypedAgentDefinition<I, O>
impl<I, O> RefUnwindSafe for TypedAgentDefinition<I, O>
impl<I, O> Send for TypedAgentDefinition<I, O>
impl<I, O> Sync for TypedAgentDefinition<I, O>
impl<I, O> Unpin for TypedAgentDefinition<I, O>
impl<I, O> UnsafeUnpin for TypedAgentDefinition<I, O>
impl<I, O> UnwindSafe for TypedAgentDefinition<I, O>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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