pub struct BlockSyncRequest {
pub chain_id: ChainID,
pub start_height: BlockHeight,
pub limit: u32,
}
Expand description
Sync request sent by a sync client to a sync server. The request includes:
- Chain ID: for identifying the blockchain the client is interested in,
- Start height: the height starting from which the client wants to obtain blocks.
- Limit: Max. number of blocks that the client wants to obtain in a response.
Fields§
§chain_id: ChainID
§start_height: BlockHeight
§limit: u32
Trait Implementations§
source§impl BorshDeserialize for BlockSyncRequest
impl BorshDeserialize for BlockSyncRequest
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 BlockSyncRequest
impl BorshSerialize for BlockSyncRequest
source§impl Clone for BlockSyncRequest
impl Clone for BlockSyncRequest
source§fn clone(&self) -> BlockSyncRequest
fn clone(&self) -> BlockSyncRequest
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<BlockSyncRequest> for Message
impl From<BlockSyncRequest> for Message
source§fn from(value: BlockSyncRequest) -> Self
fn from(value: BlockSyncRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BlockSyncRequest
impl RefUnwindSafe for BlockSyncRequest
impl Send for BlockSyncRequest
impl Sync for BlockSyncRequest
impl Unpin for BlockSyncRequest
impl UnwindSafe for BlockSyncRequest
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
)