pub enum Role {
Relay,
Origin(OriginSpec),
Client,
}Expand description
The config shape config init writes, implied by the role flags (#1772).
Role is implied by --origin, not a separate flag: presence of an origin
backend IS the role signal, exactly mirroring the runtime’s role-derived
cache.relay_foreign_namespaces default — so the generated config and the
resolver agree by construction. --client is a distinct role, not the
absence of the others: a consumer that fetches and pays, with none of the
serving sections.
Variants§
Relay
No role flag: a serving node with no origin backend — relays foreign
namespaces for pay (relay_foreign_namespaces derives to true).
Origin(OriginSpec)
--origin <URL>: a serving node with an active [cache.origin]
backend (relay_foreign_namespaces derives to false, origin-only).
Client
--client: a fetch-only consumer — identity + chain coordinates,
none of the cache/origin/serving sections.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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