pub struct BlockRange {
pub blocks: Vec<Block>,
}Expand description
A prefix of the block range specified in the get_blocks and query_archived_blocks function.
Fields§
§blocks: Vec<Block>A prefix of the requested block range.
The index of the first block is equal to GetBlocksArgs.start.
§Note
The number of blocks might be less than the requested
GetBlocksArgs.length for various reasons, for example:
- The query might have hit the replica with an outdated state that doesn’t have the full block range yet.
- The requested range is too large to fit into a single reply.
The list of blocks can be empty if:
GetBlocksArgs.lengthwas zero.GetBlocksArgs.startwas larger than the last block known to the canister.
Trait Implementations§
Source§impl CandidType for BlockRange
impl CandidType for BlockRange
Source§impl Clone for BlockRange
impl Clone for BlockRange
Source§fn clone(&self) -> BlockRange
fn clone(&self) -> BlockRange
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 BlockRange
impl Debug for BlockRange
Source§impl<'de> Deserialize<'de> for BlockRange
impl<'de> Deserialize<'de> for BlockRange
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
Source§impl PartialEq for BlockRange
impl PartialEq for BlockRange
impl Eq for BlockRange
impl StructuralPartialEq for BlockRange
Auto Trait Implementations§
impl Freeze for BlockRange
impl RefUnwindSafe for BlockRange
impl Send for BlockRange
impl Sync for BlockRange
impl Unpin for BlockRange
impl UnwindSafe for BlockRange
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