pub struct Opts {
pub identity: Arc<NodeKey>,
pub realm_trust: HashMap<[u8; 32], Vec<u8>>,
pub replication_factor: usize,
pub respawn_delay: Duration,
pub max_seeds: usize,
pub max_direct_links: usize,
pub connect_timeout: Duration,
pub admission: Option<AdmissionLimits>,
pub link_selection: LinkSelection,
pub on_link_event: Option<Arc<dyn Fn(LinkEvent) + Send + Sync>>,
pub on_issuer_error: Option<Arc<dyn Fn(IssuerError) + Send + Sync>>,
}Expand description
A pool’s configuration. Opts::new gives macula’s defaults; a zero
bound also means its default.
Fields§
§identity: Arc<NodeKey>The node’s identity key; its profile is the pool’s.
realm_trust: HashMap<[u8; 32], Vec<u8>>Each realm’s key as carried: an advertisement in a realm is trusted only when its authorization verifies against it, and an org procedure is served only in a realm it names.
replication_factor: usize§respawn_delay: Duration§max_seeds: usize§max_direct_links: usize§connect_timeout: DurationHow long Pool::connect waits for a first link.
admission: Option<AdmissionLimits>Bounds on the requests the node’s served procedures take; None is
macula’s defaults, with the cap one share per link the pool may hold.
link_selection: LinkSelection§on_link_event: Option<Arc<dyn Fn(LinkEvent) + Send + Sync>>Hears every link coming up and going down, on a task of its own.
on_issuer_error: Option<Arc<dyn Fn(IssuerError) + Send + Sync>>Hears each failure to reissue the node’s status statements or rotate
its CONNECT key; None writes it to stderr. Left failing, the links
end when their statements lapse.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Opts
impl !UnwindSafe for Opts
impl Freeze for Opts
impl Send for Opts
impl Sync for Opts
impl Unpin for Opts
impl UnsafeUnpin for Opts
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