Struct tor_netdoc::doc::netstatus::ProtoStatus
source · pub struct ProtoStatus { /* private fields */ }
Expand description
A list of subprotocol versions that implementors should/must provide.
Each consensus has two of these: one for relays, and one for clients.
Implementations§
source§impl ProtoStatus
impl ProtoStatus
sourcepub fn required_protocols(&self) -> &Protocols
pub fn required_protocols(&self) -> &Protocols
Return the protocols that are listed as “required” in this ProtoStatus
.
Implementations may assume that relays on the network implement all the protocols in the relays’ required-protocols list. Implementations should refuse to start if they do not implement all the protocols on their own (client or relay) required-protocols list.
sourcepub fn recommended_protocols(&self) -> &Protocols
pub fn recommended_protocols(&self) -> &Protocols
Return the protocols that are listed as “recommended” in this ProtoStatus
.
Implementations should warn if they do not implement all the protocols on their own (client or relay) recommended-protocols list.
Trait Implementations§
source§impl Clone for ProtoStatus
impl Clone for ProtoStatus
source§fn clone(&self) -> ProtoStatus
fn clone(&self) -> ProtoStatus
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ProtoStatus
impl Debug for ProtoStatus
source§impl Default for ProtoStatus
impl Default for ProtoStatus
source§fn default() -> ProtoStatus
fn default() -> ProtoStatus
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProtoStatus
impl RefUnwindSafe for ProtoStatus
impl Send for ProtoStatus
impl Sync for ProtoStatus
impl Unpin for ProtoStatus
impl UnwindSafe for ProtoStatus
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
Mutably borrows from an owned value. Read more
§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>
Converts
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>
Converts
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