enum RelayUsageInner {
AnyExit,
ExitToAllPorts(Vec<TargetPort>),
ExitToAnyPort {
stable_ports: Vec<TargetPort>,
unstable_ports: Vec<TargetPort>,
},
Middle,
NewIntroPoint,
ContinuingIntroPoint,
NewGuard,
ContinuingGuard,
Vanguard,
DirectoryCache,
NewRendPoint,
}
Expand description
Implementation type for RelayUsage.
This is a separate type so that we can hide its variants.
Variants§
AnyExit
Allow any relay that exits to any port.
ExitToAllPorts(Vec<TargetPort>)
Require that the relay can exit to every port in TargetPort
.
ExitToAnyPort
Require that the relay can exit to at least one port in a given set.
(We split the ports into those that require Stability and those that do not, for efficiency.)
Fields
stable_ports: Vec<TargetPort>
The desired ports that require the Stable flag.
unstable_ports: Vec<TargetPort>
The desired ports that do not require the Stable flag.
Middle
Allow any relay that’s suitable as a middle-point.
NewIntroPoint
Allow any relay that’s suitable as a newly selected introduction point.
ContinuingIntroPoint
Allow any relay that’s suitable for continued use as a pre-existing introduction point.
NewGuard
Allow any relay that’s suitable as a newly selected guard.
ContinuingGuard
Allow any relay that’s suitable for continued use as a pre-existing guard.
Vanguard
vanguards
only.Allow any relay that’s suitable as a vanguard.
DirectoryCache
Allow any relay that’s suitable as a one-hop directory cache.
NewRendPoint
Allow any relay that’s suitable as a new rendezvous point (chosen by a client connecting to an onion service).
Trait Implementations§
Source§impl Clone for RelayUsageInner
impl Clone for RelayUsageInner
Source§fn clone(&self) -> RelayUsageInner
fn clone(&self) -> RelayUsageInner
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for RelayUsageInner
impl RefUnwindSafe for RelayUsageInner
impl Send for RelayUsageInner
impl Sync for RelayUsageInner
impl Unpin for RelayUsageInner
impl UnwindSafe for RelayUsageInner
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more