Trait tor_circmgr::GuardMgrConfig

source ·
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§

source

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§

source

fn fallbacks(&self) -> &FallbackList

Access the field

source

fn bridges(&self) -> &[BridgeConfig]

Access the field

Implementors§

source§

impl GuardMgrConfig for tor_guardmgr::config::testing::TestConfig

source§

impl GuardMgrConfig for tor_circmgr::TestConfig

Available on crate feature testing only.