pub struct EnvironmentConfig {
pub env_vars: HashMap<String, String>,
pub working_dir: Option<String>,
}Expand description
Optional environment configuration for a session.
Provides environment variables and working directory context that the agent session can use during execution (e.g., for sandbox or tool execution).
§Example
use adk_managed::runtime::EnvironmentConfig;
let env = EnvironmentConfig {
env_vars: [("API_KEY".to_string(), "secret".to_string())].into(),
working_dir: Some("/workspace".to_string()),
};
assert_eq!(env.env_vars.get("API_KEY").unwrap(), "secret");Fields§
§env_vars: HashMap<String, String>Environment variables available to the agent.
working_dir: Option<String>Optional working directory for the session.
Trait Implementations§
Source§impl Clone for EnvironmentConfig
impl Clone for EnvironmentConfig
Source§fn clone(&self) -> EnvironmentConfig
fn clone(&self) -> EnvironmentConfig
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 EnvironmentConfig
impl Debug for EnvironmentConfig
Source§impl Default for EnvironmentConfig
impl Default for EnvironmentConfig
Source§fn default() -> EnvironmentConfig
fn default() -> EnvironmentConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EnvironmentConfig
impl<'de> Deserialize<'de> for EnvironmentConfig
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 EnvironmentConfig
impl RefUnwindSafe for EnvironmentConfig
impl Send for EnvironmentConfig
impl Sync for EnvironmentConfig
impl Unpin for EnvironmentConfig
impl UnsafeUnpin for EnvironmentConfig
impl UnwindSafe for EnvironmentConfig
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