pub trait ChanTarget:
HasRelayIds
+ HasAddrs
+ HasChanMethod {
// Provided methods
fn display_chan_target(&self) -> DisplayChanTarget<'_, Self>
where Self: Sized { ... }
fn all_addrs_allowed_for_outgoing_channels(&self) -> bool { ... }
fn has_all_nonzero_port(&self) -> bool { ... }
}Expand description
Information about a Tor relay used to connect to it.
Anything that implements ‘ChanTarget’ can be used as the identity of a relay for the purposes of launching a new channel.
Provided Methods§
Sourcefn display_chan_target(&self) -> DisplayChanTarget<'_, Self>where
Self: Sized,
fn display_chan_target(&self) -> DisplayChanTarget<'_, Self>where
Self: Sized,
Return a reference to this object suitable for formatting its
ChanTarget-specific members.
The display format is not exhaustive, but tries to give enough information to identify which channel target we’re talking about.
Sourcefn all_addrs_allowed_for_outgoing_channels(&self) -> bool
fn all_addrs_allowed_for_outgoing_channels(&self) -> bool
Return true if we think all addresses are allowed to be used for a relay outgoing channel.
If no address are found, true is returned.
NOTE: The set of RFCs checked here are not expected to change over time and so this should be a check that yields the same result regardless of the Rust library version. HOWEVER, it doesn’t mean that each relay/client on the network uses the same set of checks.
Sourcefn has_all_nonzero_port(&self) -> bool
fn has_all_nonzero_port(&self) -> bool
Return true iff all addresses’ ports are non-zero, or there are no addresses.
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§
impl ChanTarget for OwnedChanTarget
impl ChanTarget for OwnedCircTarget
impl<T: ChanTarget> ChanTarget for VerbatimLinkSpecCircTarget<T>
verbatim only.