pub struct AgentConfigs(/* private fields */);Implementations§
Source§impl AgentConfigs
impl AgentConfigs
pub fn new() -> Self
pub fn set(&mut self, key: String, value: AgentValue)
pub fn contains_key(&self, key: &str) -> bool
pub fn get(&self, key: &str) -> Result<&AgentValue, AgentError>
pub fn get_bool(&self, key: &str) -> Result<bool, AgentError>
pub fn get_bool_or(&self, key: &str, default: bool) -> bool
pub fn get_bool_or_default(&self, key: &str) -> bool
pub fn get_integer(&self, key: &str) -> Result<i64, AgentError>
pub fn get_integer_or(&self, key: &str, default: i64) -> i64
pub fn get_integer_or_default(&self, key: &str) -> i64
pub fn get_number(&self, key: &str) -> Result<f64, AgentError>
pub fn get_number_or(&self, key: &str, default: f64) -> f64
pub fn get_number_or_default(&self, key: &str) -> f64
pub fn get_string(&self, key: &str) -> Result<String, AgentError>
pub fn get_string_or(&self, key: &str, default: impl Into<String>) -> String
pub fn get_string_or_default(&self, key: &str) -> String
pub fn get_array(&self, key: &str) -> Result<&Vec<AgentValue>, AgentError>
pub fn get_array_or<'a>( &'a self, key: &str, default: &'a Vec<AgentValue>, ) -> &'a Vec<AgentValue>
pub fn get_array_or_default(&self, key: &str) -> Vec<AgentValue>
pub fn get_object( &self, key: &str, ) -> Result<&BTreeMap<String, AgentValue>, AgentError>
pub fn get_object_or<'a>( &'a self, key: &str, default: &'a BTreeMap<String, AgentValue>, ) -> &'a BTreeMap<String, AgentValue>
pub fn get_object_or_default(&self, key: &str) -> BTreeMap<String, AgentValue>
Trait Implementations§
Source§impl Clone for AgentConfigs
impl Clone for AgentConfigs
Source§fn clone(&self) -> AgentConfigs
fn clone(&self) -> AgentConfigs
Returns a duplicate of the value. Read more
1.0.0 · 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 AgentConfigs
impl Debug for AgentConfigs
Source§impl Default for AgentConfigs
impl Default for AgentConfigs
Source§fn default() -> AgentConfigs
fn default() -> AgentConfigs
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AgentConfigs
impl<'de> Deserialize<'de> for AgentConfigs
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
Source§impl<'a> IntoIterator for &'a AgentConfigs
impl<'a> IntoIterator for &'a AgentConfigs
Source§impl IntoIterator for AgentConfigs
impl IntoIterator for AgentConfigs
Auto Trait Implementations§
impl Freeze for AgentConfigs
impl RefUnwindSafe for AgentConfigs
impl Send for AgentConfigs
impl Sync for AgentConfigs
impl Unpin for AgentConfigs
impl UnwindSafe for AgentConfigs
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