pub enum BlockSyncMessage {
BlockSyncRequest(BlockSyncRequest),
BlockSyncResponse(BlockSyncResponse),
}
Expand description
Messages exchanged between a sync server and a sync client when syncing.
Variants§
BlockSyncRequest(BlockSyncRequest)
BlockSyncResponse(BlockSyncResponse)
Implementations§
source§impl BlockSyncMessage
impl BlockSyncMessage
pub fn block_sync_request( chain_id: ChainID, start_height: BlockHeight, limit: u32, ) -> BlockSyncMessage
pub fn block_sync_response( blocks: Vec<Block>, highest_pc: PhaseCertificate, ) -> BlockSyncMessage
Trait Implementations§
source§impl BorshDeserialize for BlockSyncMessagewhere
BlockSyncRequest: BorshDeserialize,
BlockSyncResponse: BorshDeserialize,
impl BorshDeserialize for BlockSyncMessagewhere
BlockSyncRequest: BorshDeserialize,
BlockSyncResponse: BorshDeserialize,
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 BlockSyncMessagewhere
BlockSyncRequest: BorshSerialize,
BlockSyncResponse: BorshSerialize,
impl BorshSerialize for BlockSyncMessagewhere
BlockSyncRequest: BorshSerialize,
BlockSyncResponse: BorshSerialize,
source§impl Clone for BlockSyncMessage
impl Clone for BlockSyncMessage
source§fn clone(&self) -> BlockSyncMessage
fn clone(&self) -> BlockSyncMessage
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 EnumExt for BlockSyncMessagewhere
BlockSyncRequest: BorshDeserialize,
BlockSyncResponse: BorshDeserialize,
impl EnumExt for BlockSyncMessagewhere
BlockSyncRequest: BorshDeserialize,
BlockSyncResponse: BorshDeserialize,
Auto Trait Implementations§
impl Freeze for BlockSyncMessage
impl RefUnwindSafe for BlockSyncMessage
impl Send for BlockSyncMessage
impl Sync for BlockSyncMessage
impl Unpin for BlockSyncMessage
impl UnwindSafe for BlockSyncMessage
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
)