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§
sourcefn chosen_exit(&self) -> Option<&Relay<'_>>
fn chosen_exit(&self) -> Option<&Relay<'_>>
Return the relay to use as exit node.
sourcefn compatible_with(&self) -> Option<&OwnedChanTarget>
fn compatible_with(&self) -> Option<&OwnedChanTarget>
Return the “target” that every chosen relay must be able to share a circuit with with.
sourcefn path_kind(&self) -> &'static str
fn path_kind(&self) -> &'static str
Return a short description of the path we’re trying to build, for error reporting purposes.
sourcefn pick_exit<'s, R: Rng>(
&'s self,
rng: &mut R,
netdir: &'a NetDir,
guard_exclusion: RelayExclusion<'a>,
rs_cfg: &RelaySelectionConfig<'_>
) -> Result<(Relay<'a>, RelayUsage)>
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§
impl<'a> AnonymousPathBuilder<'a> for ExitPathBuilder<'a>
impl<'a> AnonymousPathBuilder<'a> for HsPathBuilder
Available on crate feature
hs-common
only.