pub struct AgentConfig {
pub agent_did: String,
pub security_mode: Option<String>,
pub debug: bool,
pub timeout_seconds: Option<u64>,
pub parameters: HashMap<String, String>,
}Expand description
Configuration options for a TAP Agent
Fields§
§agent_did: StringAgent DID
security_mode: Option<String>Security mode for messages
debug: boolEnable debug mode
timeout_seconds: Option<u64>Timeout in seconds for network operations
parameters: HashMap<String, String>Additional configuration parameters
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn new(did: String) -> Self
pub fn new(did: String) -> Self
Creates a new AgentConfig with the specified DID Default security mode is SIGNED
Sourcepub fn set_parameter(&mut self, key: &str, value: &str)
pub fn set_parameter(&mut self, key: &str, value: &str)
Sets a configuration parameter
Sourcepub fn get_parameter(&self, key: &str) -> Option<&String>
pub fn get_parameter(&self, key: &str) -> Option<&String>
Gets a configuration parameter
Sourcepub fn with_security_mode(self, mode: &str) -> Self
pub fn with_security_mode(self, mode: &str) -> Self
Sets the security mode
Sourcepub fn with_debug(self, debug: bool) -> Self
pub fn with_debug(self, debug: bool) -> Self
Sets the debug mode
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
Returns a copy 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
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