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 check_protocols(
&self,
supported_protocols: &Protocols,
) -> StdResult<(), ProtocolSupportError>
pub fn check_protocols( &self, supported_protocols: &Protocols, ) -> StdResult<(), ProtocolSupportError>
Check whether the list of supported protocols is sufficient to satisfy this list of recommendations and requirements.
If any required protocol is missing, returns ProtocolSupportError::MissingRequired
.
Otherwise, if no required protocol is missing, but some recommended protocol is missing,
returns ProtocolSupportError::MissingRecommended
.
Otherwise, if no recommended or required protocol is missing, returns Ok(())
.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§impl<'de> Deserialize<'de> for ProtoStatus
impl<'de> Deserialize<'de> for ProtoStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ProtoStatus
impl PartialEq for ProtoStatus
Source§impl Serialize for ProtoStatus
impl Serialize for ProtoStatus
impl StructuralPartialEq for ProtoStatus
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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
.Source§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
.Source§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.Source§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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for 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