pub struct TrustedActionHandle { /* private fields */ }Expand description
Trusted, host-owned action projection. The model sees only id and the
canonical label through the prompt; the response can only name id.
Implementations§
Source§impl TrustedActionHandle
impl TrustedActionHandle
pub fn new( id: impl Into<String>, action: Action, ) -> Result<Self, CompositionError>
Sourcepub fn with_live_source(
id: impl Into<String>,
action: Action,
source: ActionSource,
mcp: Option<&LiveToolIdentity>,
host_local: Option<&ActionSource>,
) -> Result<Self, CompositionError>
pub fn with_live_source( id: impl Into<String>, action: Action, source: ActionSource, mcp: Option<&LiveToolIdentity>, host_local: Option<&ActionSource>, ) -> Result<Self, CompositionError>
Resolve a discovery-only source against the live host-owned registry
before crossing the trusted-handle boundary. This is the one-step
construction path for callers that still receive legacy Auto DTOs.
pub fn with_source( id: impl Into<String>, action: Action, source: ActionSource, ) -> Result<Self, CompositionError>
pub fn scoped( id: impl Into<String>, session_id: impl Into<String>, principal: impl Into<String>, context_id: impl Into<String>, generation: u64, action: Action, ) -> Result<Self, CompositionError>
pub fn scoped_with_source( id: impl Into<String>, session_id: impl Into<String>, principal: impl Into<String>, context_id: impl Into<String>, generation: u64, action: Action, source: ActionSource, ) -> Result<Self, CompositionError>
pub fn scoped_with_live_source( id: impl Into<String>, session_id: impl Into<String>, principal: impl Into<String>, context_id: impl Into<String>, generation: u64, action: Action, source: ActionSource, mcp: Option<&LiveToolIdentity>, host_local: Option<&ActionSource>, ) -> Result<Self, CompositionError>
pub fn id(&self) -> &str
pub fn action(&self) -> &Action
pub fn digest(&self) -> &str
pub fn source(&self) -> &ActionSource
pub fn source_type(&self) -> ActionSourceType
pub fn session_id(&self) -> &str
pub fn principal(&self) -> &str
pub fn context_id(&self) -> &str
pub fn scope_generation(&self) -> u64
Trait Implementations§
Source§impl Clone for TrustedActionHandle
impl Clone for TrustedActionHandle
Source§fn clone(&self) -> TrustedActionHandle
fn clone(&self) -> TrustedActionHandle
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 moreAuto Trait Implementations§
impl Freeze for TrustedActionHandle
impl RefUnwindSafe for TrustedActionHandle
impl Send for TrustedActionHandle
impl Sync for TrustedActionHandle
impl Unpin for TrustedActionHandle
impl UnsafeUnpin for TrustedActionHandle
impl UnwindSafe for TrustedActionHandle
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