pub struct OrderedUnit<D, H>{
pub data: Option<D>,
pub parents: Vec<<H as Hasher>::Hash>,
pub hash: <H as Hasher>::Hash,
pub creator: NodeIndex,
pub round: u16,
}
Expand description
Represents state of the main internal data structure of AlephBFT (i.e. direct acyclic graph) used for achieving consensus.
Instances of this type are returned indirectly by [member::run_session
] method using the
UnitFinalizationHandler
trait. This way it allows to reconstruct the DAG’s structure used by AlephBFT,
which can be then used for example for the purpose of node’s performance evaluation.
Fields§
§data: Option<D>
§parents: Vec<<H as Hasher>::Hash>
§hash: <H as Hasher>::Hash
§creator: NodeIndex
§round: u16
Auto Trait Implementations§
impl<D, H> Freeze for OrderedUnit<D, H>
impl<D, H> RefUnwindSafe for OrderedUnit<D, H>
impl<D, H> Send for OrderedUnit<D, H>
impl<D, H> Sync for OrderedUnit<D, H>
impl<D, H> Unpin for OrderedUnit<D, H>
impl<D, H> UnwindSafe for OrderedUnit<D, H>
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> 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