Struct aleph_bft::NetworkData
source · [−]pub struct NetworkData<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature>(_);
Expand description
NetworkData is the opaque format for all data that a committee member needs to send to other nodes.
Implementations
sourceimpl<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
sourceimpl<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>
sourcefn 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 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<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>
sourceimpl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> Decode for NetworkData<H, D, S, MS>
impl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> Decode for NetworkData<H, D, S, MS>
sourcefn decode<I: Input>(input: &mut I) -> Result<Self, Error>
fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
Attempt to deserialise the value from input.
sourcefn skip<I>(input: &mut I) -> Result<(), Error> where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error> where
I: Input,
Attempt to skip the encoded value from input. Read more
sourcefn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
sourceimpl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> Encode for NetworkData<H, D, S, MS>
impl<H: Hasher, D: Data, S: Signature, MS: PartialMultisignature> Encode for NetworkData<H, D, S, MS>
sourcefn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
sourcefn encode_to<T: Output + ?Sized>(&self, dest: &mut T)
fn encode_to<T: Output + ?Sized>(&self, dest: &mut T)
Convert self to a slice and append it to the destination.
sourcefn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
sourcefn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Auto Trait Implementations
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> where
D: Unpin,
MS: Unpin,
S: Unpin,
<H as Hasher>::Hash: Unpin,
impl<H, D, S, MS> UnwindSafe for NetworkData<H, D, S, MS> where
D: UnwindSafe,
MS: UnwindSafe,
S: UnwindSafe,
<H as Hasher>::Hash: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> DecodeLimit for T where
T: Decode,
impl<T> DecodeLimit for T where
T: Decode,
sourcefn decode_all_with_depth_limit(limit: u32, input: &[u8]) -> Result<T, Error>
fn decode_all_with_depth_limit(limit: u32, input: &[u8]) -> Result<T, Error>
Decode Self
and consume all of the given input data. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more