pub struct Suspect<I> {
pub incarnation: u32,
pub node: I,
pub from: I,
}Expand description
Suspect message
Fields§
§incarnation: u32The incarnation of the message.
node: IThe node of the message.
from: IThe source node of the message.
Implementations§
Source§impl<I> Suspect<I>
impl<I> Suspect<I>
Sourcepub const fn incarnation(&self) -> u32
pub const fn incarnation(&self) -> u32
Returns the incarnation of the message
Sourcepub const fn with_incarnation(self, val: u32) -> Suspect<I>
pub const fn with_incarnation(self, val: u32) -> Suspect<I>
Sets the incarnation of the message (Builder pattern)
Trait Implementations§
Source§impl<'arbitrary, I> Arbitrary<'arbitrary> for Suspect<I>where
I: Arbitrary<'arbitrary>,
impl<'arbitrary, I> Arbitrary<'arbitrary> for Suspect<I>where
I: Arbitrary<'arbitrary>,
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Suspect<I>, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Suspect<I>, Error>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Suspect<I>, Error>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Suspect<I>, Error>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreimpl<I> Copy for Suspect<I>where
I: Copy,
Source§impl<I> Data for Suspect<I>where
I: Data,
impl<I> Data for Suspect<I>where
I: Data,
Source§fn from_ref(
val: <Suspect<I> as Data>::Ref<'_>,
) -> Result<Suspect<I>, DecodeError>
fn from_ref( val: <Suspect<I> as Data>::Ref<'_>, ) -> Result<Suspect<I>, DecodeError>
Converts the reference type to the owned type.
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the data only considering the data itself, (e.g. no length prefix, no wire type).
Source§fn encode(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
fn encode(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
Encodes the message to a buffer. Read more
Source§fn encoded_len_with_length_delimited(&self) -> usize
fn encoded_len_with_length_delimited(&self) -> usize
Returns the encoded length of the data including the length delimited.
Source§fn encode_to_vec(&self) -> Result<Vec<u8>, EncodeError>
fn encode_to_vec(&self) -> Result<Vec<u8>, EncodeError>
Available on crate features
alloc or std only.Encodes the message into a vec.
Source§fn encode_to_bytes(&self) -> Result<Bytes, EncodeError>
fn encode_to_bytes(&self) -> Result<Bytes, EncodeError>
Available on crate features
alloc or std only.Encodes the message into a
Bytes.Source§fn encode_length_delimited(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
fn encode_length_delimited(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Result<Vec<u8>, EncodeError>
fn encode_length_delimited_to_vec(&self) -> Result<Vec<u8>, EncodeError>
Available on crate features
alloc or std only.Encodes the message with a length-delimiter into a vec.
Source§fn encode_length_delimited_to_bytes(&self) -> Result<Bytes, EncodeError>
fn encode_length_delimited_to_bytes(&self) -> Result<Bytes, EncodeError>
Available on crate features
alloc or std only.Encodes the message with a length-delimiter into a
Bytes.Source§fn decode(src: &[u8]) -> Result<(usize, Self), DecodeError>where
Self: Sized,
fn decode(src: &[u8]) -> Result<(usize, Self), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: &[u8]) -> Result<(usize, Self), DecodeError>where
Self: Sized,
fn decode_length_delimited(buf: &[u8]) -> Result<(usize, Self), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from the buffer.
Source§impl<'a, I> DataRef<'a, Suspect<I>> for Suspect<<I as Data>::Ref<'a>>where
I: Data,
impl<'a, I> DataRef<'a, Suspect<I>> for Suspect<<I as Data>::Ref<'a>>where
I: Data,
Source§fn decode(
src: &'a [u8],
) -> Result<(usize, Suspect<<I as Data>::Ref<'a>>), DecodeError>
fn decode( src: &'a [u8], ) -> Result<(usize, Suspect<<I as Data>::Ref<'a>>), DecodeError>
Decodes the reference type from a buffer. Read more
Source§fn decode_length_delimited(src: &'a [u8]) -> Result<(usize, Self), DecodeError>where
Self: Sized,
fn decode_length_delimited(src: &'a [u8]) -> Result<(usize, Self), DecodeError>where
Self: Sized,
Decodes a length-delimited reference instance of the message from the buffer.
Source§impl<'de, I> Deserialize<'de> for Suspect<I>where
I: Deserialize<'de>,
impl<'de, I> Deserialize<'de> for Suspect<I>where
I: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Suspect<I>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Suspect<I>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<I> Eq for Suspect<I>where
I: Eq,
Source§impl<'a, I, A> From<Suspect<I>> for MessageRef<'a, I, A>
impl<'a, I, A> From<Suspect<I>> for MessageRef<'a, I, A>
Source§fn from(value: Suspect<I>) -> MessageRef<'a, I, A>
fn from(value: Suspect<I>) -> MessageRef<'a, I, A>
Converts to this type from the input type.
Source§impl<I> PartialEq for Suspect<I>where
I: PartialEq,
impl<I> PartialEq for Suspect<I>where
I: PartialEq,
Source§impl<I> Serialize for Suspect<I>where
I: Serialize,
impl<I> Serialize for Suspect<I>where
I: Serialize,
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<I> StructuralPartialEq for Suspect<I>where
I: PartialEq,
Auto Trait Implementations§
impl<I> Freeze for Suspect<I>where
I: Freeze,
impl<I> RefUnwindSafe for Suspect<I>where
I: RefUnwindSafe,
impl<I> Send for Suspect<I>where
I: Send,
impl<I> Sync for Suspect<I>where
I: Sync,
impl<I> Unpin for Suspect<I>where
I: Unpin,
impl<I> UnsafeUnpin for Suspect<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for Suspect<I>where
I: 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