pub struct NetworkData<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature>(/* private fields */);
Expand description
NetworkData is the opaque format for all data that a committee member needs to send to other nodes.
Implementations§
Source§impl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> NetworkData<H, D, S, MS>
impl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> NetworkData<H, D, S, MS>
Sourcepub fn included_data(&self) -> Vec<D>
pub fn included_data(&self) -> Vec<D>
Returns all the Data in the network message that might end up in the ordering as a result of accepting this message. Useful for ensuring data availability, if Data only represents the objects the user wants to order, and facilitates access to the Data before it is ordered for optimization purposes.
Trait Implementations§
Source§impl<H: Clone + Hasher, D: Clone + Data, S: Clone + Signature, MS: Clone + PartialMultisignature> Clone for NetworkData<H, D, S, MS>
impl<H: Clone + Hasher, D: Clone + Data, S: Clone + Signature, MS: Clone + PartialMultisignature> Clone for NetworkData<H, D, S, MS>
Source§fn clone(&self) -> NetworkData<H, D, S, MS>
fn clone(&self) -> NetworkData<H, D, S, MS>
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<H: Debug + Hasher, D: Debug + Data, S: Debug + Signature, MS: Debug + PartialMultisignature> Debug for NetworkData<H, D, S, MS>
impl<H: Debug + Hasher, D: Debug + Data, S: Debug + Signature, MS: Debug + PartialMultisignature> Debug for NetworkData<H, D, S, MS>
Source§impl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> Decode for NetworkData<H, D, S, MS>where
NetworkDataInner<H, D, S, MS>: Decode,
impl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> Decode for NetworkData<H, D, S, MS>where
NetworkDataInner<H, D, S, MS>: Decode,
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> Encode for NetworkData<H, D, S, MS>where
NetworkDataInner<H, D, S, MS>: Encode,
impl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> Encode for NetworkData<H, D, S, MS>where
NetworkDataInner<H, D, S, MS>: Encode,
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn>(
&self,
f: __CodecUsingEncodedCallback,
) -> __CodecOutputReturn
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl<H: PartialEq + Hasher, D: PartialEq + Data, S: PartialEq + Signature, MS: PartialEq + PartialMultisignature> PartialEq for NetworkData<H, D, S, MS>
impl<H: PartialEq + Hasher, D: PartialEq + Data, S: PartialEq + Signature, MS: PartialEq + PartialMultisignature> PartialEq for NetworkData<H, D, S, MS>
impl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> EncodeLike for NetworkData<H, D, S, MS>where
NetworkDataInner<H, D, S, MS>: Encode,
impl<H: Eq + Hasher, D: Eq + Data, S: Eq + Signature, MS: Eq + PartialMultisignature> Eq for NetworkData<H, D, S, MS>
impl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> StructuralPartialEq for NetworkData<H, D, S, MS>
Auto Trait Implementations§
impl<H, D, S, MS> !Freeze for NetworkData<H, D, S, MS>
impl<H, D, S, MS> !RefUnwindSafe for NetworkData<H, D, S, MS>
impl<H, D, S, MS> Send for NetworkData<H, D, S, MS>
impl<H, D, S, MS> Sync for NetworkData<H, D, S, MS>
impl<H, D, S, MS> Unpin for NetworkData<H, D, S, MS>
impl<H, D, S, MS> UnwindSafe for NetworkData<H, D, S, MS>
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,
Source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
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