Trait AnonymousPathBuilder

Source
trait AnonymousPathBuilder {
    // Required methods
    fn compatible_with(&self) -> Option<&OwnedChanTarget>;
    fn path_kind(&self) -> &'static str;
    fn pick_exit<'a, R: Rng>(
        &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 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<'a, R: Rng>( &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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl AnonymousPathBuilder for ExitPathBuilder

Source§

impl AnonymousPathBuilder for HsPathBuilder

Available on crate feature hs-common only.