Enum near_primitives::sharding::EncodedShardChunk[][src]

pub enum EncodedShardChunk {
    V1(EncodedShardChunkV1),
    V2(EncodedShardChunkV2),
}

Variants

Implementations

impl EncodedShardChunk[src]

pub fn cloned_header(&self) -> ShardChunkHeader[src]

pub fn content(&self) -> &EncodedShardChunkBody[src]

pub fn content_mut(&mut self) -> &mut EncodedShardChunkBody[src]

pub fn shard_id(&self) -> ShardId[src]

pub fn encoded_merkle_root(&self) -> CryptoHash[src]

pub fn encoded_length(&self) -> u64[src]

pub fn from_header(
    header: ShardChunkHeader,
    total_parts: usize,
    protocol_version: ProtocolVersion
) -> Self
[src]

pub fn new(
    prev_block_hash: CryptoHash,
    prev_state_root: StateRoot,
    outcome_root: CryptoHash,
    height: BlockHeight,
    shard_id: ShardId,
    rs: &mut ReedSolomonWrapper,
    gas_used: Gas,
    gas_limit: Gas,
    balance_burnt: Balance,
    tx_root: CryptoHash,
    validator_proposals: Vec<ValidatorStake>,
    transactions: Vec<SignedTransaction>,
    outgoing_receipts: &Vec<Receipt>,
    outgoing_receipts_root: CryptoHash,
    signer: &dyn ValidatorSigner,
    protocol_version: ProtocolVersion
) -> Result<(Self, Vec<MerklePath>), Error>
[src]

pub fn from_parts_and_metadata(
    prev_block_hash: CryptoHash,
    prev_state_root: StateRoot,
    outcome_root: CryptoHash,
    height: BlockHeight,
    shard_id: ShardId,
    gas_used: Gas,
    gas_limit: Gas,
    balance_burnt: Balance,
    outgoing_receipts_root: CryptoHash,
    tx_root: CryptoHash,
    validator_proposals: Vec<ValidatorStake>,
    encoded_length: u64,
    parts: Vec<Option<Box<[u8]>>>,
    rs: &mut ReedSolomonWrapper,
    signer: &dyn ValidatorSigner,
    protocol_version: ProtocolVersion
) -> (Self, Vec<MerklePath>)
[src]

pub fn chunk_hash(&self) -> ChunkHash[src]

pub fn create_partial_encoded_chunk(
    &self,
    part_ords: Vec<u64>,
    receipts: Vec<ReceiptProof>,
    merkle_paths: &[MerklePath]
) -> PartialEncodedChunk
[src]

pub fn create_partial_encoded_chunk_with_arc_receipts(
    &self,
    part_ords: Vec<u64>,
    receipts: Vec<Arc<ReceiptProof>>,
    merkle_paths: &[MerklePath]
) -> PartialEncodedChunkWithArcReceipts
[src]

pub fn decode_chunk(&self, data_parts: usize) -> Result<ShardChunk, Error>[src]

Trait Implementations

impl BorshDeserialize for EncodedShardChunk where
    EncodedShardChunkV1: BorshDeserialize,
    EncodedShardChunkV2: BorshDeserialize
[src]

impl BorshSerialize for EncodedShardChunk where
    EncodedShardChunkV1: BorshSerialize,
    EncodedShardChunkV2: BorshSerialize
[src]

impl Clone for EncodedShardChunk[src]

impl Debug for EncodedShardChunk[src]

impl Eq for EncodedShardChunk[src]

impl PartialEq<EncodedShardChunk> for EncodedShardChunk[src]

impl Serialize for EncodedShardChunk[src]

impl StructuralEq for EncodedShardChunk[src]

impl StructuralPartialEq for EncodedShardChunk[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,