pub struct AgentOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a Agent message.
Wraps ::buffa::OwnedView<AgentView<'static>>: the decoded view and the ::buffa::bytes::Bytes buffer it borrows from travel together, so the handle is 'static and Send + Sync — suitable for async handlers, spawned tasks, and anywhere a 'static bound is required.
Field accessors return borrows tied to &self. Use Self::view to get the full AgentView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl AgentOwnedView
impl AgentOwnedView
Sourcepub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
pub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
Decode an owned view from a ::buffa::bytes::Bytes buffer.
The view borrows directly from the buffer’s data; the buffer is retained inside the returned handle.
§Errors
Returns ::buffa::DecodeError if the buffer contains invalid
protobuf data.
Sourcepub fn decode_with_options(
bytes: Bytes,
opts: &DecodeOptions,
) -> Result<Self, DecodeError>
pub fn decode_with_options( bytes: Bytes, opts: &DecodeOptions, ) -> Result<Self, DecodeError>
Decode with custom ::buffa::DecodeOptions (recursion limit,
max message size).
§Errors
Returns ::buffa::DecodeError if the buffer is invalid or
exceeds the configured limits.
Sourcepub fn from_owned(msg: &Agent) -> Result<Self, DecodeError>
pub fn from_owned(msg: &Agent) -> Result<Self, DecodeError>
Build from an owned message via an encode → decode round-trip.
§Errors
Returns ::buffa::DecodeError if the re-encoded bytes are
somehow invalid (should not happen for well-formed messages).
Sourcepub fn view(&self) -> &AgentView<'_>
pub fn view(&self) -> &AgentView<'_>
Borrow the full AgentView with its lifetime tied to &self.
Sourcepub fn to_owned_message(&self) -> Agent
pub fn to_owned_message(&self) -> Agent
Convert to the owned message type.
Sourcepub fn into_bytes(self) -> Bytes
pub fn into_bytes(self) -> Bytes
Consume the handle, returning the underlying bytes buffer.
Sourcepub fn catalog_name(&self) -> &str
pub fn catalog_name(&self) -> &str
Name of parent catalog.
Field 2: catalog_name
Sourcepub fn schema_name(&self) -> &str
pub fn schema_name(&self) -> &str
Name of parent schema.
Field 3: schema_name
Sourcepub fn full_name(&self) -> &str
pub fn full_name(&self) -> &str
The three-level (fully qualified) name of the agent.
Field 4: full_name
Sourcepub fn invocation_protocol(&self) -> EnumValue<InvocationProtocol>
pub fn invocation_protocol(&self) -> EnumValue<InvocationProtocol>
The protocol a recipient uses to invoke the agent.
Field 6: invocation_protocol
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
An LLM-readable description of what the agent does and the inputs it expects.
Field 8: description
Sourcepub fn capabilities(&self) -> &RepeatedView<'_, &str>
pub fn capabilities(&self) -> &RepeatedView<'_, &str>
Capability identifiers advertised by the agent (e.g. sql_query,
document_search, code_execution).
Field 9: capabilities
Sourcepub fn input_schema(&self) -> Option<&str>
pub fn input_schema(&self) -> Option<&str>
A JSON Schema (encoded as a JSON string) describing the agent’s expected input payload. Kept as an opaque string so the schema can evolve without changing this message.
Field 10: input_schema
Sourcepub fn comment(&self) -> Option<&str>
pub fn comment(&self) -> Option<&str>
User-provided free-form text description.
Field 12: comment
Sourcepub fn created_at(&self) -> Option<i64>
pub fn created_at(&self) -> Option<i64>
Time at which this agent was created, in epoch milliseconds.
Field 1000: created_at
Sourcepub fn created_by(&self) -> Option<&str>
pub fn created_by(&self) -> Option<&str>
Username of agent creator.
Field 1001: created_by
Sourcepub fn updated_at(&self) -> Option<i64>
pub fn updated_at(&self) -> Option<i64>
Time at which this agent was last updated, in epoch milliseconds.
Field 1002: updated_at
Sourcepub fn updated_by(&self) -> Option<&str>
pub fn updated_by(&self) -> Option<&str>
Username of user who last modified the agent.
Field 1003: updated_by
Sourcepub fn metastore_id(&self) -> Option<&str>
pub fn metastore_id(&self) -> Option<&str>
The unique identifier of the metastore.
Field 1004: metastore_id
Trait Implementations§
Source§impl Clone for AgentOwnedView
impl Clone for AgentOwnedView
Source§fn clone(&self) -> AgentOwnedView
fn clone(&self) -> AgentOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more