pub struct NodeStateRef<'a, I, A> {
pub id: I,
pub addr: A,
pub meta: &'a [u8],
pub state: State,
pub protocol_version: ProtocolVersion,
pub delegate_version: DelegateVersion,
}Expand description
The reference type for NodeState.
Fields§
§id: IThe id of the node.
addr: AThe address of the node.
meta: &'a [u8]Metadata from the delegate for this node.
state: StateState of the node.
protocol_version: ProtocolVersionThe protocol version of the node is speaking.
delegate_version: DelegateVersionThe delegate version of the node is speaking.
Implementations§
Source§impl<'a, I, A> NodeStateRef<'a, I, A>
impl<'a, I, A> NodeStateRef<'a, I, A>
Sourcepub const fn protocol_version(&self) -> ProtocolVersion
pub const fn protocol_version(&self) -> ProtocolVersion
Returns the protocol version of the node is speaking
Sourcepub const fn delegate_version(&self) -> DelegateVersion
pub const fn delegate_version(&self) -> DelegateVersion
Returns the delegate version of the node is speaking
Trait Implementations§
Source§impl<'a, I, A> Clone for NodeStateRef<'a, I, A>
impl<'a, I, A> Clone for NodeStateRef<'a, I, A>
Source§fn clone(&self) -> NodeStateRef<'a, I, A>
fn clone(&self) -> NodeStateRef<'a, I, A>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a, I, A> Copy for NodeStateRef<'a, I, A>
Source§impl<'a, I, A> Debug for NodeStateRef<'a, I, A>
impl<'a, I, A> Debug for NodeStateRef<'a, I, A>
Source§impl<'de, 'a, I, A> Deserialize<'de> for NodeStateRef<'a, I, A>where
'de: 'a,
I: Deserialize<'de>,
A: Deserialize<'de>,
impl<'de, 'a, I, A> Deserialize<'de> for NodeStateRef<'a, I, A>where
'de: 'a,
I: Deserialize<'de>,
A: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeStateRef<'a, I, A>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeStateRef<'a, I, A>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<'a, I, A> Eq for NodeStateRef<'a, I, A>
Source§impl<'a, I, A> From<PushNodeStateRef<'a, I, A>> for NodeStateRef<'a, I, A>
impl<'a, I, A> From<PushNodeStateRef<'a, I, A>> for NodeStateRef<'a, I, A>
Source§fn from(value: PushNodeStateRef<'a, I, A>) -> NodeStateRef<'a, I, A>
fn from(value: PushNodeStateRef<'a, I, A>) -> NodeStateRef<'a, I, A>
Converts to this type from the input type.
Source§impl<'a, I, A> Hash for NodeStateRef<'a, I, A>
impl<'a, I, A> Hash for NodeStateRef<'a, I, A>
Source§impl<'a, I, A> PartialEq for NodeStateRef<'a, I, A>
impl<'a, I, A> PartialEq for NodeStateRef<'a, I, A>
Source§fn eq(&self, other: &NodeStateRef<'a, I, A>) -> bool
fn eq(&self, other: &NodeStateRef<'a, I, A>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a, I, A> Serialize for NodeStateRef<'a, I, A>
impl<'a, I, A> Serialize for NodeStateRef<'a, I, A>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'a, I, A> StructuralPartialEq for NodeStateRef<'a, I, A>
Auto Trait Implementations§
impl<'a, I, A> Freeze for NodeStateRef<'a, I, A>
impl<'a, I, A> RefUnwindSafe for NodeStateRef<'a, I, A>where
I: RefUnwindSafe,
A: RefUnwindSafe,
impl<'a, I, A> Send for NodeStateRef<'a, I, A>
impl<'a, I, A> Sync for NodeStateRef<'a, I, A>
impl<'a, I, A> Unpin for NodeStateRef<'a, I, A>
impl<'a, I, A> UnsafeUnpin for NodeStateRef<'a, I, A>where
I: UnsafeUnpin,
A: UnsafeUnpin,
impl<'a, I, A> UnwindSafe for NodeStateRef<'a, I, A>where
I: UnwindSafe,
A: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
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