Trait tor_circmgr::GuardMgrConfig

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§

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§

fn fallbacks(&self) -> &FallbackList

Access the field

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

Access the field

Implementors§

source§

impl GuardMgrConfig for tor_circmgr::config::test_config::TestConfig

Available on crate feature testing only.
§

impl GuardMgrConfig for TestConfig