ex3_ic_agent/agent/
agent_config.rs1use crate::{
2 agent::{NonceFactory, NonceGenerator, Transport},
3 identity::{anonymous::AnonymousIdentity, Identity},
4};
5use std::{sync::Arc, time::Duration};
6
7pub struct AgentConfig {
9 pub nonce_factory: Arc<dyn NonceGenerator>,
11 pub identity: Arc<dyn Identity>,
13 pub ingress_expiry: Option<Duration>,
15 pub transport: Option<Arc<dyn Transport>>,
17}
18
19impl Default for AgentConfig {
20 fn default() -> Self {
21 Self {
22 nonce_factory: Arc::new(NonceFactory::random()),
23 identity: Arc::new(AnonymousIdentity {}),
24 ingress_expiry: None,
25 transport: None,
26 }
27 }
28}