pub enum PeerCommand {
Statistics,
PullBlocks {
from: u64,
count: u32,
},
PullHashes {
from: u64,
count: u32,
},
Finalized,
PullProof {
epoch: u32,
},
Push(Arc<Vec<u8>>),
}Expand description
ピアに頼むこと(crate::chain::Action::Command)。駆動役が実際に送り、返事を ChainEvent で返す
Variants§
Statistics
PullBlocks
PullHashes
Finalized
ピアの最新のファイナライズ
PullProof
Push(Arc<Vec<u8>>)
作ったブロックを押し付ける。返事はなく、失敗したときだけ ChainEvent::Failed を返す
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeerCommand
impl RefUnwindSafe for PeerCommand
impl Send for PeerCommand
impl Sync for PeerCommand
impl Unpin for PeerCommand
impl UnsafeUnpin for PeerCommand
impl UnwindSafe for PeerCommand
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