pub struct BlockSyncResponse {
pub blocks: Vec<Block>,
pub highest_pc: PhaseCertificate,
}
Expand description
Sync response sent by a sync server to a sync client requesting blocks. The response includes:
- Blocks: entire
Block
s that the client can validate and insert into their blockchain, - HighestPC: highest-viewed
PhaseCertificate
known to the server, which the client can validate and use to find out what is the latest consensus decision is.
Fields§
§blocks: Vec<Block>
§highest_pc: PhaseCertificate
Trait Implementations§
source§impl BorshDeserialize for BlockSyncResponse
impl BorshDeserialize for BlockSyncResponse
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for BlockSyncResponse
impl BorshSerialize for BlockSyncResponse
source§impl Clone for BlockSyncResponse
impl Clone for BlockSyncResponse
source§fn clone(&self) -> BlockSyncResponse
fn clone(&self) -> BlockSyncResponse
Returns a copy 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 From<BlockSyncResponse> for Message
impl From<BlockSyncResponse> for Message
source§fn from(value: BlockSyncResponse) -> Self
fn from(value: BlockSyncResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BlockSyncResponse
impl RefUnwindSafe for BlockSyncResponse
impl Send for BlockSyncResponse
impl Sync for BlockSyncResponse
impl Unpin for BlockSyncResponse
impl UnwindSafe for BlockSyncResponse
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)