Trait tor_circmgr::path::AnonymousPathBuilder

source ·
trait AnonymousPathBuilder<'a> {
    // Required methods
    fn chosen_exit(&self) -> Option<&Relay<'_>>;
    fn compatible_with(&self) -> Option<&OwnedChanTarget>;
    fn path_kind(&self) -> &'static str;
    fn pick_exit<'s, R: Rng>(
        &'s self,
        rng: &mut R,
        netdir: &'a NetDir,
        guard_exclusion: RelayExclusion<'a>,
        rs_cfg: &RelaySelectionConfig<'_>
    ) -> Result<(Relay<'a>, RelayUsage)>;
}
Expand description

A path builder that builds multi-hop, anonymous paths.

Required Methods§

source

fn chosen_exit(&self) -> Option<&Relay<'_>>

Return the relay to use as exit node.

source

fn compatible_with(&self) -> Option<&OwnedChanTarget>

Return the “target” that every chosen relay must be able to share a circuit with with.

source

fn path_kind(&self) -> &'static str

Return a short description of the path we’re trying to build, for error reporting purposes.

source

fn pick_exit<'s, R: Rng>( &'s self, rng: &mut R, netdir: &'a NetDir, guard_exclusion: RelayExclusion<'a>, rs_cfg: &RelaySelectionConfig<'_> ) -> Result<(Relay<'a>, RelayUsage)>

Find a suitable exit node from either the chosen exit or from the network directory.

Return the exit, along with the usage for a middle node corresponding to this exit.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a> AnonymousPathBuilder<'a> for ExitPathBuilder<'a>

source§

impl<'a> AnonymousPathBuilder<'a> for HsPathBuilder

Available on crate feature hs-common only.