pub enum RelayChoice {
ServerDefault,
Override(RelayTarget),
Only(RelayTarget),
NoRelay,
}Expand description
Per-stream relay selection for ProducerReachConfig::reach_with_relay (#384).
Lets one stream pick a relay (or go relay-only / direct-only) independently of another in the SAME process — the heterogeneous-anonymization property.
Variants§
ServerDefault
Use the server-global relay (ProducerReachConfig::relay) — the common
case. Falls back to direct-only when the server has no relay configured.
Override(RelayTarget)
Override the server-global relay with a separately resolver-verified per-stream target (e.g. per-tenant isolation). Direct reaches are still advertised alongside it. A transport alone cannot authenticate an Iroh relay and is deliberately not representable here.
Only(RelayTarget)
Relay-ONLY (anonymized): use this per-stream relay and OMIT all direct reaches, so the client can only route through the relay (server authority).
NoRelay
No relay reach for this stream — advertise the direct reaches only.
Named NoRelay (not None) to avoid shadowing Option::None under a
glob import of this enum’s variants.
Trait Implementations§
Source§impl Clone for RelayChoice
impl Clone for RelayChoice
Source§fn clone(&self) -> RelayChoice
fn clone(&self) -> RelayChoice
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RelayChoice
impl Debug for RelayChoice
Source§impl Default for RelayChoice
impl Default for RelayChoice
Source§fn default() -> RelayChoice
fn default() -> RelayChoice
Auto Trait Implementations§
impl Freeze for RelayChoice
impl RefUnwindSafe for RelayChoice
impl Send for RelayChoice
impl Sync for RelayChoice
impl Unpin for RelayChoice
impl UnsafeUnpin for RelayChoice
impl UnwindSafe for RelayChoice
Blanket Implementations§
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> 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