pub enum SyncResponse {
Blocks(Vec<(Block, Option<QuorumCertificate>)>),
Status {
last_committed_height: Height,
current_view: ViewNumber,
epoch: EpochNumber,
},
Error(String),
Snapshots(Vec<SnapshotInfo>),
SnapshotChunk {
height: Height,
chunk_index: u32,
data: Vec<u8>,
},
}Expand description
Sync response from a node serving blocks
Variants§
Blocks(Vec<(Block, Option<QuorumCertificate>)>)
Requested blocks with their commit QCs (may be fewer than requested).
Each tuple is (Block, Option<QC>) — QC is None for genesis or if not available.
Status
Current status of the responding node
Error(String)
Error (e.g., invalid range)
Snapshots(Vec<SnapshotInfo>)
List of available state snapshots
SnapshotChunk
A chunk of a state snapshot
Trait Implementations§
Source§impl Clone for SyncResponse
impl Clone for SyncResponse
Source§fn clone(&self) -> SyncResponse
fn clone(&self) -> SyncResponse
Returns a duplicate 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 Debug for SyncResponse
impl Debug for SyncResponse
Source§impl<'de> Deserialize<'de> for SyncResponse
impl<'de> Deserialize<'de> for SyncResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SyncResponse
impl RefUnwindSafe for SyncResponse
impl Send for SyncResponse
impl Sync for SyncResponse
impl Unpin for SyncResponse
impl UnsafeUnpin for SyncResponse
impl UnwindSafe for SyncResponse
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