pub struct AgentCtx {
pub base: BaseCtx,
pub label: String,
pub model: Model,
/* private fields */
}Expand description
Context for agent operations, providing access to models, tools, and other agents.
Fields§
§base: BaseCtxBase context providing fundamental operations.
label: StringLabel of the agent.
model: ModelDefault AI model instance for completions.
Implementations§
Source§impl AgentCtx
impl AgentCtx
Sourcepub fn child(
&self,
agent_name: &str,
agent_label: &str,
) -> Result<Self, BoxError>
pub fn child( &self, agent_name: &str, agent_label: &str, ) -> Result<Self, BoxError>
Creates a child context for a specific agent.
§Arguments
agent_name- Name of the agent to create context for.
Sourcepub fn child_base(&self, tool_name: &str) -> Result<BaseCtx, BoxError>
pub fn child_base(&self, tool_name: &str) -> Result<BaseCtx, BoxError>
Creates a child base context for a specific tool.
§Arguments
tool_name- Name of the tool to create context for.
Sourcepub fn with_caller(&self, caller: Principal) -> Self
pub fn with_caller(&self, caller: Principal) -> Self
Clones the context with a new caller principal.
Sourcepub fn completion_iter(
self,
req: CompletionRequest,
resources: Vec<Resource>,
) -> CompletionRunner
pub fn completion_iter( self, req: CompletionRequest, resources: Vec<Resource>, ) -> CompletionRunner
Creates a completion runner for iterative processing of completion requests.
Sourcepub fn completion_stream(
self,
req: CompletionRequest,
resources: Vec<Resource>,
) -> CompletionStream
pub fn completion_stream( self, req: CompletionRequest, resources: Vec<Resource>, ) -> CompletionStream
Creates a completion stream for processing of completion requests.
Trait Implementations§
Source§impl<T> Agent<AgentCtx> for Extractor<T>
impl<T> Agent<AgentCtx> for Extractor<T>
Source§fn description(&self) -> String
fn description(&self) -> String
Source§async fn run(
&self,
ctx: AgentCtx,
prompt: String,
_resources: Vec<Resource>,
) -> Result<AgentOutput, BoxError>
async fn run( &self, ctx: AgentCtx, prompt: String, _resources: Vec<Resource>, ) -> Result<AgentOutput, BoxError>
Source§fn definition(&self) -> FunctionDefinition
fn definition(&self) -> FunctionDefinition
Source§fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
Source§impl Agent<AgentCtx> for EchoEngineInfo
impl Agent<AgentCtx> for EchoEngineInfo
Source§fn description(&self) -> String
fn description(&self) -> String
Returns a description of the agent’s purpose and capabilities.
Source§async fn run(
&self,
_ctx: AgentCtx,
_prompt: String,
_resources: Vec<Resource>,
) -> Result<AgentOutput, BoxError>
async fn run( &self, _ctx: AgentCtx, _prompt: String, _resources: Vec<Resource>, ) -> Result<AgentOutput, BoxError>
Source§fn definition(&self) -> FunctionDefinition
fn definition(&self) -> FunctionDefinition
Source§fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
Source§impl Agent<AgentCtx> for RemoteAgent
impl Agent<AgentCtx> for RemoteAgent
Source§fn description(&self) -> String
fn description(&self) -> String
Source§fn definition(&self) -> FunctionDefinition
fn definition(&self) -> FunctionDefinition
Source§async fn run(
&self,
ctx: AgentCtx,
prompt: String,
resources: Vec<Resource>,
) -> Result<AgentOutput, BoxError>
async fn run( &self, ctx: AgentCtx, prompt: String, resources: Vec<Resource>, ) -> Result<AgentOutput, BoxError>
Source§fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
Source§impl Agent<AgentCtx> for SubAgent
impl Agent<AgentCtx> for SubAgent
Source§fn description(&self) -> String
fn description(&self) -> String
Source§fn definition(&self) -> FunctionDefinition
fn definition(&self) -> FunctionDefinition
Source§fn tool_dependencies(&self) -> Vec<String>
fn tool_dependencies(&self) -> Vec<String>
Source§async fn run(
&self,
ctx: AgentCtx,
prompt: String,
resources: Vec<Resource>,
) -> Result<AgentOutput, BoxError>
async fn run( &self, ctx: AgentCtx, prompt: String, resources: Vec<Resource>, ) -> Result<AgentOutput, BoxError>
Source§impl Agent<AgentCtx> for SubAgentManager
impl Agent<AgentCtx> for SubAgentManager
Source§fn description(&self) -> String
fn description(&self) -> String
Source§fn definition(&self) -> FunctionDefinition
fn definition(&self) -> FunctionDefinition
Source§async fn init(&self, ctx: AgentCtx) -> Result<(), BoxError>
async fn init(&self, ctx: AgentCtx) -> Result<(), BoxError>
Source§async fn run(
&self,
ctx: AgentCtx,
prompt: String,
resources: Vec<Resource>,
) -> Result<AgentOutput, BoxError>
async fn run( &self, ctx: AgentCtx, prompt: String, resources: Vec<Resource>, ) -> Result<AgentOutput, BoxError>
Source§impl Agent<AgentCtx> for ToolsSearch
impl Agent<AgentCtx> for ToolsSearch
Source§fn description(&self) -> String
fn description(&self) -> String
Source§fn definition(&self) -> FunctionDefinition
fn definition(&self) -> FunctionDefinition
Source§async fn run(
&self,
ctx: AgentCtx,
prompt: String,
_resources: Vec<Resource>,
) -> Result<AgentOutput, BoxError>
async fn run( &self, ctx: AgentCtx, prompt: String, _resources: Vec<Resource>, ) -> Result<AgentOutput, BoxError>
Source§fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
Source§impl Agent<AgentCtx> for ToolsSelect
impl Agent<AgentCtx> for ToolsSelect
Source§fn description(&self) -> String
fn description(&self) -> String
Source§fn definition(&self) -> FunctionDefinition
fn definition(&self) -> FunctionDefinition
Source§async fn run(
&self,
ctx: AgentCtx,
prompt: String,
_resources: Vec<Resource>,
) -> Result<AgentOutput, BoxError>
async fn run( &self, ctx: AgentCtx, prompt: String, _resources: Vec<Resource>, ) -> Result<AgentOutput, BoxError>
Source§fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
Source§impl AgentContext for AgentCtx
impl AgentContext for AgentCtx
Source§fn tool_definitions(&self, names: Option<&[String]>) -> Vec<FunctionDefinition>
fn tool_definitions(&self, names: Option<&[String]>) -> Vec<FunctionDefinition>
Source§async fn remote_tool_definitions(
&self,
endpoint: Option<&str>,
names: Option<&[String]>,
) -> Result<Vec<FunctionDefinition>, BoxError>
async fn remote_tool_definitions( &self, endpoint: Option<&str>, names: Option<&[String]>, ) -> Result<Vec<FunctionDefinition>, BoxError>
Source§async fn select_tool_resources(
&self,
prefixed_name: &str,
resources: &mut Vec<Resource>,
) -> Vec<Resource>
async fn select_tool_resources( &self, prefixed_name: &str, resources: &mut Vec<Resource>, ) -> Vec<Resource>
Extracts resources from the provided list based on the tool’s supported tags.
Source§fn agent_definitions(&self, names: Option<&[String]>) -> Vec<FunctionDefinition>
fn agent_definitions(&self, names: Option<&[String]>) -> Vec<FunctionDefinition>
Source§async fn remote_agent_definitions(
&self,
endpoint: Option<&str>,
names: Option<&[String]>,
) -> Result<Vec<FunctionDefinition>, BoxError>
async fn remote_agent_definitions( &self, endpoint: Option<&str>, names: Option<&[String]>, ) -> Result<Vec<FunctionDefinition>, BoxError>
Source§async fn select_agent_resources(
&self,
prefixed_name: &str,
resources: &mut Vec<Resource>,
) -> Vec<Resource>
async fn select_agent_resources( &self, prefixed_name: &str, resources: &mut Vec<Resource>, ) -> Vec<Resource>
Extracts resources from the provided list based on the agent’s supported tags.
Source§async fn definitions(&self, names: Option<&[String]>) -> Vec<FunctionDefinition>
async fn definitions(&self, names: Option<&[String]>) -> Vec<FunctionDefinition>
Retrieves definitions for available tools and agents, including those from remote engines.
Source§async fn tool_call(
&self,
input: ToolInput<Json>,
) -> Result<(ToolOutput<Json>, Option<Principal>), BoxError>
async fn tool_call( &self, input: ToolInput<Json>, ) -> Result<(ToolOutput<Json>, Option<Principal>), BoxError>
Source§fn agent_run(
self,
input: AgentInput,
) -> impl Future<Output = Result<(AgentOutput, Option<Principal>), BoxError>> + Send
fn agent_run( self, input: AgentInput, ) -> impl Future<Output = Result<(AgentOutput, Option<Principal>), BoxError>> + Send
Runs a local agent.
§Arguments
args- Tool input arguments,AgentInput.
§Returns
AgentOutput containing the result of the agent execution.
Source§async fn remote_agent_run(
&self,
endpoint: &str,
args: AgentInput,
) -> Result<AgentOutput, BoxError>
async fn remote_agent_run( &self, endpoint: &str, args: AgentInput, ) -> Result<AgentOutput, BoxError>
Runs a remote agent via HTTP RPC.
§Arguments
endpoint- Remote endpoint URL;args- Tool input arguments,AgentInput. Themetafield will be set to the current agent’s metadata.
§Returns
AgentOutput containing the result of the agent execution.
Source§impl BaseContext for AgentCtx
impl BaseContext for AgentCtx
Source§async fn remote_tool_call(
&self,
endpoint: &str,
args: ToolInput<Json>,
) -> Result<ToolOutput<Json>, BoxError>
async fn remote_tool_call( &self, endpoint: &str, args: ToolInput<Json>, ) -> Result<ToolOutput<Json>, BoxError>
Executes a remote tool call via HTTP RPC.
§Arguments
endpoint- Remote endpoint URL;args- Tool input arguments,ToolInput.
§Returns
ToolOutput containing the final result.
Source§impl CacheFeatures for AgentCtx
impl CacheFeatures for AgentCtx
Source§fn cache_contains(&self, key: &str) -> bool
fn cache_contains(&self, key: &str) -> bool
Checks if a key exists in the cache.
Source§async fn cache_get<T>(&self, key: &str) -> Result<T, BoxError>where
T: DeserializeOwned,
async fn cache_get<T>(&self, key: &str) -> Result<T, BoxError>where
T: DeserializeOwned,
Gets a cached value by key, returns error if not found or deserialization fails.
Source§async fn cache_get_with<T, F>(&self, key: &str, init: F) -> Result<T, BoxError>where
T: Sized + DeserializeOwned + Serialize + Send,
F: Future<Output = Result<(T, Option<CacheExpiry>), BoxError>> + Send + 'static,
async fn cache_get_with<T, F>(&self, key: &str, init: F) -> Result<T, BoxError>where
T: Sized + DeserializeOwned + Serialize + Send,
F: Future<Output = Result<(T, Option<CacheExpiry>), BoxError>> + Send + 'static,
Gets a cached value or initializes it if missing.
If key doesn’t exist, calls init function to create value and cache it.
Source§async fn cache_set<T>(&self, key: &str, val: (T, Option<CacheExpiry>))
async fn cache_set<T>(&self, key: &str, val: (T, Option<CacheExpiry>))
Sets a value in cache with optional expiration policy.
Source§async fn cache_set_if_not_exists<T>(
&self,
key: &str,
val: (T, Option<CacheExpiry>),
) -> bool
async fn cache_set_if_not_exists<T>( &self, key: &str, val: (T, Option<CacheExpiry>), ) -> bool
Sets a value in cache if key doesn’t exist, returns true if set.
Source§async fn cache_delete(&self, key: &str) -> bool
async fn cache_delete(&self, key: &str) -> bool
Deletes a cached value by key, returns true if key existed.
Source§fn cache_raw_iter(
&self,
) -> impl Iterator<Item = (Arc<String>, Arc<(Bytes, Option<CacheExpiry>)>)>
fn cache_raw_iter( &self, ) -> impl Iterator<Item = (Arc<String>, Arc<(Bytes, Option<CacheExpiry>)>)>
Returns an iterator over all cached items with raw value.
Source§impl CacheStoreFeatures for AgentCtx
impl CacheStoreFeatures for AgentCtx
Source§fn cache_store_init<'life0, 'life1, 'async_trait, T, F>(
&'life0 self,
key: &'life1 str,
init: F,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Sync + Send>>> + Send + 'async_trait>>
fn cache_store_init<'life0, 'life1, 'async_trait, T, F>( &'life0 self, key: &'life1 str, init: F, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Sync + Send>>> + Send + 'async_trait>>
init if missing.Source§fn cache_store_get<'life0, 'life1, 'async_trait, T>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(T, UpdateVersion), Box<dyn Error + Sync + Send>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: DeserializeOwned + Serialize + Send + 'async_trait,
Self: 'async_trait,
fn cache_store_get<'life0, 'life1, 'async_trait, T>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(T, UpdateVersion), Box<dyn Error + Sync + Send>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: DeserializeOwned + Serialize + Send + 'async_trait,
Self: 'async_trait,
Source§fn cache_store_set<'life0, 'life1, 'async_trait, T>(
&'life0 self,
key: &'life1 str,
val: T,
version: Option<UpdateVersion>,
) -> Pin<Box<dyn Future<Output = Result<UpdateVersion, Box<dyn Error + Sync + Send>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: DeserializeOwned + Serialize + Send + 'async_trait,
Self: 'async_trait,
fn cache_store_set<'life0, 'life1, 'async_trait, T>(
&'life0 self,
key: &'life1 str,
val: T,
version: Option<UpdateVersion>,
) -> Pin<Box<dyn Future<Output = Result<UpdateVersion, Box<dyn Error + Sync + Send>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: DeserializeOwned + Serialize + Send + 'async_trait,
Self: 'async_trait,
Source§fn cache_store_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Sync + Send>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn cache_store_delete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Sync + Send>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Source§impl CanisterCaller for AgentCtx
impl CanisterCaller for AgentCtx
Source§async fn canister_query<In: ArgumentEncoder + Send, Out: CandidType + for<'a> Deserialize<'a>>(
&self,
canister: &Principal,
method: &str,
args: In,
) -> Result<Out, BoxError>
async fn canister_query<In: ArgumentEncoder + Send, Out: CandidType + for<'a> Deserialize<'a>>( &self, canister: &Principal, method: &str, args: In, ) -> Result<Out, BoxError>
Performs a query call to a canister (read-only, no state changes).
§Arguments
canister- Target canister principal;method- Method name to call;args- Input arguments encoded in Candid format.
Source§async fn canister_update<In: ArgumentEncoder + Send, Out: CandidType + for<'a> Deserialize<'a>>(
&self,
canister: &Principal,
method: &str,
args: In,
) -> Result<Out, BoxError>
async fn canister_update<In: ArgumentEncoder + Send, Out: CandidType + for<'a> Deserialize<'a>>( &self, canister: &Principal, method: &str, args: In, ) -> Result<Out, BoxError>
Performs an update call to a canister (may modify state).
§Arguments
canister- Target canister principal;method- Method name to call;args- Input arguments encoded in Candid format.
Source§impl CompletionFeatures for AgentCtx
impl CompletionFeatures for AgentCtx
Source§fn completion(
&self,
req: CompletionRequest,
resources: Vec<Resource>,
) -> impl Future<Output = Result<AgentOutput, BoxError>> + Send
fn completion( &self, req: CompletionRequest, resources: Vec<Resource>, ) -> impl Future<Output = Result<AgentOutput, BoxError>> + Send
Executes a completion request with automatic tool call handling.
This method handles the completion request in a loop, automatically executing any tool calls that are returned by the model and feeding their results back into the model until no more tool calls need to be processed.
§Arguments
req-CompletionRequestcontaining the input parameters;resources- Optional list of resources to use for tool calls.
§Returns
AgentOutput containing the final completion result.
§Process Flow
- Makes initial completion request to the model;
- If tool calls are returned:
- Executes each tool call;
- Adds tool results to the chat history;
- Repeats the completion with updated history;
- Returns final result when no more tool calls need processing.
Source§fn model_name(&self) -> String
fn model_name(&self) -> String
Source§impl HttpFeatures for AgentCtx
impl HttpFeatures for AgentCtx
Source§async fn https_call(
&self,
url: &str,
method: Method,
headers: Option<HeaderMap>,
body: Option<Vec<u8>>,
) -> Result<Response, BoxError>
async fn https_call( &self, url: &str, method: Method, headers: Option<HeaderMap>, body: Option<Vec<u8>>, ) -> Result<Response, BoxError>
Makes an HTTPs request.
§Arguments
url- Target URL, should start withhttps://;method- HTTP method (GET, POST, etc.);headers- Optional HTTP headers;body- Optional request body (default empty).
Source§async fn https_signed_call(
&self,
url: &str,
method: Method,
message_digest: [u8; 32],
headers: Option<HeaderMap>,
body: Option<Vec<u8>>,
) -> Result<Response, BoxError>
async fn https_signed_call( &self, url: &str, method: Method, message_digest: [u8; 32], headers: Option<HeaderMap>, body: Option<Vec<u8>>, ) -> Result<Response, BoxError>
Makes a signed HTTPs request with message authentication.
§Arguments
url- Target URL;method- HTTP method (GET, POST, etc.);message_digest- 32-byte message digest for signing;headers- Optional HTTP headers;body- Optional request body (default empty).
Source§async fn https_signed_rpc<T>(
&self,
endpoint: &str,
method: &str,
args: impl Serialize + Send,
) -> Result<T, BoxError>where
T: DeserializeOwned,
async fn https_signed_rpc<T>(
&self,
endpoint: &str,
method: &str,
args: impl Serialize + Send,
) -> Result<T, BoxError>where
T: DeserializeOwned,
Makes a signed CBOR-encoded RPC call.
§Arguments
endpoint- URL endpoint to send the request to;method- RPC method name to call;args- Arguments to serialize as CBOR and send with the request.
Source§impl KeysFeatures for AgentCtx
impl KeysFeatures for AgentCtx
Source§async fn a256gcm_key(
&self,
derivation_path: Vec<Vec<u8>>,
) -> Result<[u8; 32], BoxError>
async fn a256gcm_key( &self, derivation_path: Vec<Vec<u8>>, ) -> Result<[u8; 32], BoxError>
Derives a 256-bit AES-GCM key from the given derivation path.
Source§async fn ed25519_sign_message(
&self,
derivation_path: Vec<Vec<u8>>,
message: &[u8],
) -> Result<[u8; 64], BoxError>
async fn ed25519_sign_message( &self, derivation_path: Vec<Vec<u8>>, message: &[u8], ) -> Result<[u8; 64], BoxError>
Signs a message using Ed25519 signature scheme from the given derivation path.
Source§async fn ed25519_verify(
&self,
derivation_path: Vec<Vec<u8>>,
message: &[u8],
signature: &[u8],
) -> Result<(), BoxError>
async fn ed25519_verify( &self, derivation_path: Vec<Vec<u8>>, message: &[u8], signature: &[u8], ) -> Result<(), BoxError>
Verifies an Ed25519 signature from the given derivation path.
Source§async fn ed25519_public_key(
&self,
derivation_path: Vec<Vec<u8>>,
) -> Result<[u8; 32], BoxError>
async fn ed25519_public_key( &self, derivation_path: Vec<Vec<u8>>, ) -> Result<[u8; 32], BoxError>
Gets the public key for Ed25519 from the given derivation path.
Source§async fn secp256k1_sign_message_bip340(
&self,
derivation_path: Vec<Vec<u8>>,
message: &[u8],
) -> Result<[u8; 64], BoxError>
async fn secp256k1_sign_message_bip340( &self, derivation_path: Vec<Vec<u8>>, message: &[u8], ) -> Result<[u8; 64], BoxError>
Signs a message using Secp256k1 BIP340 Schnorr signature from the given derivation path.
Source§async fn secp256k1_verify_bip340(
&self,
derivation_path: Vec<Vec<u8>>,
message: &[u8],
signature: &[u8],
) -> Result<(), BoxError>
async fn secp256k1_verify_bip340( &self, derivation_path: Vec<Vec<u8>>, message: &[u8], signature: &[u8], ) -> Result<(), BoxError>
Verifies a Secp256k1 BIP340 Schnorr signature from the given derivation path.
Source§async fn secp256k1_sign_message_ecdsa(
&self,
derivation_path: Vec<Vec<u8>>,
message: &[u8],
) -> Result<[u8; 64], BoxError>
async fn secp256k1_sign_message_ecdsa( &self, derivation_path: Vec<Vec<u8>>, message: &[u8], ) -> Result<[u8; 64], BoxError>
Signs a message using Secp256k1 ECDSA signature from the given derivation path. The message will be hashed with SHA-256 before signing.
Source§async fn secp256k1_sign_digest_ecdsa(
&self,
derivation_path: Vec<Vec<u8>>,
message_hash: &[u8],
) -> Result<[u8; 64], BoxError>
async fn secp256k1_sign_digest_ecdsa( &self, derivation_path: Vec<Vec<u8>>, message_hash: &[u8], ) -> Result<[u8; 64], BoxError>
Signs a message hash using Secp256k1 ECDSA signature from the given derivation path.
Source§impl StateFeatures for AgentCtx
impl StateFeatures for AgentCtx
Source§fn engine_name(&self) -> &str
fn engine_name(&self) -> &str
Source§fn caller(&self) -> &Principal
fn caller(&self) -> &Principal
Source§fn meta(&self) -> &RequestMeta
fn meta(&self) -> &RequestMeta
Source§fn cancellation_token(&self) -> CancellationToken
fn cancellation_token(&self) -> CancellationToken
Source§fn time_elapsed(&self) -> Duration
fn time_elapsed(&self) -> Duration
Source§impl StoreFeatures for AgentCtx
impl StoreFeatures for AgentCtx
Source§async fn store_get(&self, path: &Path) -> Result<(Bytes, ObjectMeta), BoxError>
async fn store_get(&self, path: &Path) -> Result<(Bytes, ObjectMeta), BoxError>
Retrieves data from storage at the specified path.
Source§async fn store_list(
&self,
prefix: Option<&Path>,
offset: &Path,
) -> Result<Vec<ObjectMeta>, BoxError>
async fn store_list( &self, prefix: Option<&Path>, offset: &Path, ) -> Result<Vec<ObjectMeta>, BoxError>
Lists objects in storage with optional prefix and offset filters.
§Arguments
prefix- Optional path prefix to filter results;offset- Optional path to start listing from (exclude).
Source§async fn store_put(
&self,
path: &Path,
mode: PutMode,
value: Bytes,
) -> Result<PutResult, BoxError>
async fn store_put( &self, path: &Path, mode: PutMode, value: Bytes, ) -> Result<PutResult, BoxError>
Stores data at the specified path with a given write mode.
§Arguments
path- Target storage path;mode- Write mode (Create, Overwrite, etc.);value- Data to store as bytes.
Auto Trait Implementations§
impl Freeze for AgentCtx
impl !RefUnwindSafe for AgentCtx
impl Send for AgentCtx
impl Sync for AgentCtx
impl Unpin for AgentCtx
impl UnsafeUnpin for AgentCtx
impl !UnwindSafe for AgentCtx
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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