pub trait GuardMgrConfig: AsRef<FallbackList> + AsRef<[BridgeConfig]> {
// Required method
fn bridges_enabled(&self) -> bool;
// Provided methods
fn fallbacks(&self) -> &FallbackList { ... }
fn bridges(&self) -> &[BridgeConfig] { ... }
}Expand description
Configuration for a guard manager
If the guard manager gains new configurabilities, this trait will gain additional supertraits, as an API break.
Prefer to use TorClientConfig, which will always implement this trait.
Required Methods§
Sourcefn bridges_enabled(&self) -> bool
fn bridges_enabled(&self) -> bool
Should the bridges be used?
This is only allowed to return true if bridges() is nonempty.
Therefore, it also requires tor-guardmgr cargo feature bridge-client,
since without that feature BridgeConfig is uninhabited and therefore
bridges is necessarily empty.
Provided Methods§
Sourcefn fallbacks(&self) -> &FallbackList
fn fallbacks(&self) -> &FallbackList
Access the field
Sourcefn bridges(&self) -> &[BridgeConfig]
fn bridges(&self) -> &[BridgeConfig]
Access the field