pub struct Alive<I, A> {
pub incarnation: u32,
pub meta: Meta,
pub node: Node<I, A>,
pub protocol_version: ProtocolVersion,
pub delegate_version: DelegateVersion,
}Expand description
Alive message
Fields§
§incarnation: u32The incarnation of the alive message
meta: MetaThe meta of the alive message
node: Node<I, A>The node of the alive message
protocol_version: ProtocolVersionThe protocol version of the alive message is speaking
delegate_version: DelegateVersionThe delegate version of the alive message is speaking
Implementations§
Source§impl<I, A> Alive<I, A>
impl<I, A> Alive<I, A>
Sourcepub const fn incarnation(&self) -> u32
pub const fn incarnation(&self) -> u32
Returns the incarnation of the alive message
Sourcepub const fn protocol_version(&self) -> ProtocolVersion
pub const fn protocol_version(&self) -> ProtocolVersion
Returns the protocol version of the alive message is speaking
Sourcepub const fn delegate_version(&self) -> DelegateVersion
pub const fn delegate_version(&self) -> DelegateVersion
Returns the delegate version of the alive message is speaking
Sourcepub const fn with_incarnation(self, val: u32) -> Self
pub const fn with_incarnation(self, val: u32) -> Self
Sets the incarnation of the alive message (Builder pattern)
Sourcepub fn with_node(self, val: Node<I, A>) -> Self
pub fn with_node(self, val: Node<I, A>) -> Self
Sets the node of the alive message (Builder pattern)
Sourcepub const fn with_protocol_version(self, val: ProtocolVersion) -> Self
pub const fn with_protocol_version(self, val: ProtocolVersion) -> Self
Sets the protocol version of the alive message is speaking (Builder pattern)
Sourcepub const fn with_delegate_version(self, val: DelegateVersion) -> Self
pub const fn with_delegate_version(self, val: DelegateVersion) -> Self
Sets the delegate version of the alive message is speaking (Builder pattern)
Source§impl<I, A> Alive<I, A>
impl<I, A> Alive<I, A>
Sourcepub const fn new(incarnation: u32, node: Node<I, A>) -> Self
pub const fn new(incarnation: u32, node: Node<I, A>) -> Self
Construct a new alive message with the given incarnation, meta, node, protocol version and delegate version.
Sourcepub fn set_incarnation(&mut self, incarnation: u32) -> &mut Self
pub fn set_incarnation(&mut self, incarnation: u32) -> &mut Self
Sets the incarnation of the alive message.
Sourcepub fn set_protocol_version(
&mut self,
protocol_version: ProtocolVersion,
) -> &mut Self
pub fn set_protocol_version( &mut self, protocol_version: ProtocolVersion, ) -> &mut Self
Set the protocol version of the alive message is speaking.
Sourcepub fn set_delegate_version(
&mut self,
delegate_version: DelegateVersion,
) -> &mut Self
pub fn set_delegate_version( &mut self, delegate_version: DelegateVersion, ) -> &mut Self
Set the delegate version of the alive message is speaking.
Trait Implementations§
Source§impl<I, A> Archive for Alive<I, A>where
u32: Archive,
Meta: Archive,
Node<I, A>: Archive,
ProtocolVersion: Archive,
DelegateVersion: Archive,
impl<I, A> Archive for Alive<I, A>where
u32: Archive,
Meta: Archive,
Node<I, A>: Archive,
ProtocolVersion: Archive,
DelegateVersion: Archive,
Source§type Archived = ArchivedAlive<I, A>
type Archived = ArchivedAlive<I, A>
Source§type Resolver = AliveResolver<I, A>
type Resolver = AliveResolver<I, A>
Source§fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)
fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)
Source§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
serialize. Read moreSource§impl<I: CheapClone, A: CheapClone> CheapClone for Alive<I, A>
impl<I: CheapClone, A: CheapClone> CheapClone for Alive<I, A>
Source§fn cheap_clone(&self) -> Self
fn cheap_clone(&self) -> Self
Source§impl<'de, I, A> Deserialize<'de> for Alive<I, A>where
I: Deserialize<'de>,
A: Deserialize<'de>,
impl<'de, I, A> Deserialize<'de> for Alive<I, A>where
I: Deserialize<'de>,
A: Deserialize<'de>,
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<__D: Fallible + ?Sized, I, A> Deserialize<Alive<I, A>, __D> for Archived<Alive<I, A>>where
u32: Archive,
<u32 as Archive>::Archived: Deserialize<u32, __D>,
Meta: Archive,
<Meta as Archive>::Archived: Deserialize<Meta, __D>,
Node<I, A>: Archive,
<Node<I, A> as Archive>::Archived: Deserialize<Node<I, A>, __D>,
ProtocolVersion: Archive,
<ProtocolVersion as Archive>::Archived: Deserialize<ProtocolVersion, __D>,
DelegateVersion: Archive,
<DelegateVersion as Archive>::Archived: Deserialize<DelegateVersion, __D>,
impl<__D: Fallible + ?Sized, I, A> Deserialize<Alive<I, A>, __D> for Archived<Alive<I, A>>where
u32: Archive,
<u32 as Archive>::Archived: Deserialize<u32, __D>,
Meta: Archive,
<Meta as Archive>::Archived: Deserialize<Meta, __D>,
Node<I, A>: Archive,
<Node<I, A> as Archive>::Archived: Deserialize<Node<I, A>, __D>,
ProtocolVersion: Archive,
<ProtocolVersion as Archive>::Archived: Deserialize<ProtocolVersion, __D>,
DelegateVersion: Archive,
<DelegateVersion as Archive>::Archived: Deserialize<DelegateVersion, __D>,
Source§impl<I: CheapClone, A: CheapClone> From<Alive<I, A>> for NodeState<I, A>
impl<I: CheapClone, A: CheapClone> From<Alive<I, A>> for NodeState<I, A>
Source§impl<I, A> PartialEq<Alive<I, A>> for ArchivedAlive<I, A>where
u32: Archive,
Meta: Archive,
Node<I, A>: Archive,
ProtocolVersion: Archive,
DelegateVersion: Archive,
<u32 as Archive>::Archived: PartialEq<u32>,
<Meta as Archive>::Archived: PartialEq<Meta>,
<Node<I, A> as Archive>::Archived: PartialEq<Node<I, A>>,
<ProtocolVersion as Archive>::Archived: PartialEq<ProtocolVersion>,
<DelegateVersion as Archive>::Archived: PartialEq<DelegateVersion>,
impl<I, A> PartialEq<Alive<I, A>> for ArchivedAlive<I, A>where
u32: Archive,
Meta: Archive,
Node<I, A>: Archive,
ProtocolVersion: Archive,
DelegateVersion: Archive,
<u32 as Archive>::Archived: PartialEq<u32>,
<Meta as Archive>::Archived: PartialEq<Meta>,
<Node<I, A> as Archive>::Archived: PartialEq<Node<I, A>>,
<ProtocolVersion as Archive>::Archived: PartialEq<ProtocolVersion>,
<DelegateVersion as Archive>::Archived: PartialEq<DelegateVersion>,
Source§impl<I, A> PartialEq<ArchivedAlive<I, A>> for Alive<I, A>where
u32: Archive,
Meta: Archive,
Node<I, A>: Archive,
ProtocolVersion: Archive,
DelegateVersion: Archive,
<u32 as Archive>::Archived: PartialEq<u32>,
<Meta as Archive>::Archived: PartialEq<Meta>,
<Node<I, A> as Archive>::Archived: PartialEq<Node<I, A>>,
<ProtocolVersion as Archive>::Archived: PartialEq<ProtocolVersion>,
<DelegateVersion as Archive>::Archived: PartialEq<DelegateVersion>,
impl<I, A> PartialEq<ArchivedAlive<I, A>> for Alive<I, A>where
u32: Archive,
Meta: Archive,
Node<I, A>: Archive,
ProtocolVersion: Archive,
DelegateVersion: Archive,
<u32 as Archive>::Archived: PartialEq<u32>,
<Meta as Archive>::Archived: PartialEq<Meta>,
<Node<I, A> as Archive>::Archived: PartialEq<Node<I, A>>,
<ProtocolVersion as Archive>::Archived: PartialEq<ProtocolVersion>,
<DelegateVersion as Archive>::Archived: PartialEq<DelegateVersion>,
Source§impl<__S: Fallible + ?Sized, I, A> Serialize<__S> for Alive<I, A>where
u32: Serialize<__S>,
Meta: Serialize<__S>,
Node<I, A>: Serialize<__S>,
ProtocolVersion: Serialize<__S>,
DelegateVersion: Serialize<__S>,
impl<__S: Fallible + ?Sized, I, A> Serialize<__S> for Alive<I, A>where
u32: Serialize<__S>,
Meta: Serialize<__S>,
Node<I, A>: Serialize<__S>,
ProtocolVersion: Serialize<__S>,
DelegateVersion: Serialize<__S>,
Source§impl<I, A> Transformable for Alive<I, A>where
I: Transformable + 'static,
A: Transformable + 'static,
impl<I, A> Transformable for Alive<I, A>where
I: Transformable + 'static,
A: Transformable + 'static,
Source§type Error = AliveTransformError<I, A>
type Error = AliveTransformError<I, A>
Source§fn encode(&self, dst: &mut [u8]) -> Result<usize, Self::Error>
fn encode(&self, dst: &mut [u8]) -> Result<usize, Self::Error>
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn decode(src: &[u8]) -> Result<(usize, Self), Self::Error>where
Self: Sized,
fn decode(src: &[u8]) -> Result<(usize, Self), Self::Error>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Result<Vec<u8>, Self::Error>
fn encode_to_vec(&self) -> Result<Vec<u8>, Self::Error>
alloc or std only.Source§fn encode_to_writer<W>(&self, writer: &mut W) -> Result<usize, Error>where
W: Write,
fn encode_to_writer<W>(&self, writer: &mut W) -> Result<usize, Error>where
W: Write,
std only.Source§fn encode_to_async_writer<W>(
&self,
writer: &mut W,
) -> impl Future<Output = Result<usize, Error>> + Send
fn encode_to_async_writer<W>( &self, writer: &mut W, ) -> impl Future<Output = Result<usize, Error>> + Send
async only.impl<I: Eq, A: Eq> Eq for Alive<I, A>
impl<I, A> StructuralPartialEq for Alive<I, A>
Auto Trait Implementations§
impl<I, A> !Freeze for Alive<I, A>
impl<I, A> RefUnwindSafe for Alive<I, A>where
I: RefUnwindSafe,
A: RefUnwindSafe,
impl<I, A> Send for Alive<I, A>
impl<I, A> Sync for Alive<I, A>
impl<I, A> Unpin for Alive<I, A>
impl<I, A> UnwindSafe for Alive<I, A>where
I: UnwindSafe,
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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<K, Q> Comparable<Q> for K
impl<K, Q> Comparable<Q> for K
Source§impl<T> Decodable for Twhere
T: Transformable,
impl<T> Decodable for Twhere
T: Transformable,
Source§type Error = <T as Transformable>::Error
type Error = <T as Transformable>::Error
Source§fn decode(src: &[u8]) -> Result<(usize, T), <T as Decodable>::Error>
fn decode(src: &[u8]) -> Result<(usize, T), <T as Decodable>::Error>
Source§impl<T> Encodable for Twhere
T: Transformable,
impl<T> Encodable for Twhere
T: Transformable,
Source§type Error = <T as Transformable>::Error
type Error = <T as Transformable>::Error
Source§fn encode(&self, dst: &mut [u8]) -> Result<usize, <T as Encodable>::Error>
fn encode(&self, dst: &mut [u8]) -> Result<usize, <T as Encodable>::Error>
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode_to_vec(&self) -> Result<Vec<u8>, <T as Encodable>::Error>
fn encode_to_vec(&self) -> Result<Vec<u8>, <T as Encodable>::Error>
alloc or std only.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§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
key and return true if they are equal.Source§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
Source§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
key and return true if they are equal.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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.