pub struct BlockWrite<'a> {
pub height: u64,
pub hash: [u8; 32],
pub bytes: &'a [u8],
pub state: Vec<Change>,
pub nodes: Vec<Change>,
pub statement: Vec<u8>,
pub voters: Option<(u32, Vec<u8>)>,
pub meta: Vec<u8>,
}Expand description
ブロック1つを当てたあとに、まとめて書くもの
Fields§
§height: u64§hash: [u8; 32]§bytes: &'a [u8]§state: Vec<Change>変わった状態の行(None は消す)
nodes: Vec<Change>変わった木のノード(None は消す)
statement: Vec<u8>§voters: Option<(u32, Vec<u8>)>このブロックで決まった投票者(エポック、投票者の表)
meta: Vec<u8>実行の状態(チェックポイントにもする)
Auto Trait Implementations§
impl<'a> Freeze for BlockWrite<'a>
impl<'a> RefUnwindSafe for BlockWrite<'a>
impl<'a> Send for BlockWrite<'a>
impl<'a> Sync for BlockWrite<'a>
impl<'a> Unpin for BlockWrite<'a>
impl<'a> UnsafeUnpin for BlockWrite<'a>
impl<'a> UnwindSafe for BlockWrite<'a>
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