pub struct HostedToolCompleted { /* private fields */ }Expand description
Complete provider-hosted tool activity safe for canonical projection.
Implementations§
Source§impl HostedToolCompleted
impl HostedToolCompleted
Sourcepub fn new(
index: ModelStreamIndex,
provider_call_id: ProviderToolCallId,
tool_name: impl Into<String>,
arguments: Value,
outcome: HostedToolOutcome,
sources: Vec<ExternalSource>,
continuation: Option<ProviderContinuation>,
) -> Result<Self, ModelStreamValueError>
pub fn new( index: ModelStreamIndex, provider_call_id: ProviderToolCallId, tool_name: impl Into<String>, arguments: Value, outcome: HostedToolOutcome, sources: Vec<ExternalSource>, continuation: Option<ProviderContinuation>, ) -> Result<Self, ModelStreamValueError>
Creates one validated complete hosted activity.
§Errors
Returns an error for invalid identity, arguments, or source bounds.
Sourcepub const fn index(&self) -> ModelStreamIndex
pub const fn index(&self) -> ModelStreamIndex
Returns the response-local stream index.
Sourcepub const fn provider_call_id(&self) -> &ProviderToolCallId
pub const fn provider_call_id(&self) -> &ProviderToolCallId
Returns the provider activity identifier.
Sourcepub const fn outcome(&self) -> &HostedToolOutcome
pub const fn outcome(&self) -> &HostedToolOutcome
Returns the provider-reported terminal outcome.
Sourcepub fn sources(&self) -> &[ExternalSource]
pub fn sources(&self) -> &[ExternalSource]
Returns normalized sources in provider order.
Sourcepub const fn continuation(&self) -> Option<&ProviderContinuation>
pub const fn continuation(&self) -> Option<&ProviderContinuation>
Returns opaque same-provider continuation data.
Trait Implementations§
Source§impl Clone for HostedToolCompleted
impl Clone for HostedToolCompleted
Source§fn clone(&self) -> HostedToolCompleted
fn clone(&self) -> HostedToolCompleted
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 HostedToolCompleted
impl Debug for HostedToolCompleted
impl Eq for HostedToolCompleted
Source§impl PartialEq for HostedToolCompleted
impl PartialEq for HostedToolCompleted
impl StructuralPartialEq for HostedToolCompleted
Auto Trait Implementations§
impl Freeze for HostedToolCompleted
impl RefUnwindSafe for HostedToolCompleted
impl Send for HostedToolCompleted
impl Sync for HostedToolCompleted
impl Unpin for HostedToolCompleted
impl UnsafeUnpin for HostedToolCompleted
impl UnwindSafe for HostedToolCompleted
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