Enum tor_linkspec::PtTargetAddr
source · [−]#[non_exhaustive]
pub enum PtTargetAddr {
IpPort(SocketAddr),
HostPort(String, u16),
None,
}Expand description
An address that an be passed to a pluggable transport to tell it where to connect (typically, to a bridge).
Not every transport accepts all kinds of addresses.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IpPort(SocketAddr)
An IP address and port for a Tor relay.
This is the only address type supported by the BuiltIn transport.
HostPort(String, u16)
Available on crate feature
pt-client only.A hostname-and-port target address. Some transports may support this.
None
Available on crate feature
pt-client only.A completely absent target address. Some transports support this.
Trait Implementations
sourceimpl Clone for PtTargetAddr
impl Clone for PtTargetAddr
sourcefn clone(&self) -> PtTargetAddr
fn clone(&self) -> PtTargetAddr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for PtTargetAddr
impl Debug for PtTargetAddr
sourceimpl Display for PtTargetAddr
impl Display for PtTargetAddr
sourceimpl FromStr for PtTargetAddr
impl FromStr for PtTargetAddr
sourceimpl Hash for PtTargetAddr
impl Hash for PtTargetAddr
sourceimpl PartialEq<PtTargetAddr> for PtTargetAddr
impl PartialEq<PtTargetAddr> for PtTargetAddr
sourcefn eq(&self, other: &PtTargetAddr) -> bool
fn eq(&self, other: &PtTargetAddr) -> bool
impl Eq for PtTargetAddr
impl StructuralEq for PtTargetAddr
impl StructuralPartialEq for PtTargetAddr
Auto Trait Implementations
impl RefUnwindSafe for PtTargetAddr
impl Send for PtTargetAddr
impl Sync for PtTargetAddr
impl Unpin for PtTargetAddr
impl UnwindSafe for PtTargetAddr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more