pub struct AgentConfig(/* private fields */);Implementations§
Source§impl AgentConfig
impl AgentConfig
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) -> Option<&AgentValue>
pub fn get_bool(&self, key: &str) -> Option<bool>
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) -> Option<i64>
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) -> Option<f64>
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) -> Option<String>
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) -> Option<&Vec<AgentValue>>
pub fn get_array_or<'a>( &'a self, key: &str, default: &'a Vec<AgentValue>, ) -> &'a Vec<AgentValue>
pub fn get_object(&self, key: &str) -> Option<&BTreeMap<String, AgentValue>>
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
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 AgentConfig
impl Debug for AgentConfig
Source§impl Default for AgentConfig
impl Default for AgentConfig
Source§fn default() -> AgentConfig
fn default() -> AgentConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AgentConfig
impl<'de> Deserialize<'de> for AgentConfig
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 AgentConfig
impl<'a> IntoIterator for &'a AgentConfig
Source§impl IntoIterator for AgentConfig
impl IntoIterator for AgentConfig
Auto Trait Implementations§
impl Freeze for AgentConfig
impl RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnwindSafe for AgentConfig
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