pub struct ToolGrant {
pub definition: ToolDefinition,
pub source_id: Option<String>,
pub execution_binding: Value,
}Expand description
A host-authorized tool capability resolved for a deferred call-path. It carries the callable contract and Lashlang identity (via the tool definition) plus the host-owned Tool Execution Binding that routes a call to the backing account, service, secret, or remote executor.
Fields§
§definition: ToolDefinitionThe callable contract and Lashlang identity for the resolved tool.
source_id: Option<String>Optional registry source route authorized by the host. Registry-backed grants require this route at execution time; direct host providers may ignore it.
execution_binding: ValueHost-owned routing authority that connects the grant to the backing account/service/secret/executor. Opaque to the runtime; the host interprets it when fulfilling the call and when rebuilding for replay.
Implementations§
Source§impl ToolGrant
impl ToolGrant
pub fn new(definition: ToolDefinition) -> Self
pub fn with_source_id(self, source_id: impl Into<String>) -> Self
pub fn with_execution_binding(self, execution_binding: Value) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolGrant
impl<'de> Deserialize<'de> for ToolGrant
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ToolGrant
impl RefUnwindSafe for ToolGrant
impl Send for ToolGrant
impl Sync for ToolGrant
impl Unpin for ToolGrant
impl UnsafeUnpin for ToolGrant
impl UnwindSafe for ToolGrant
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