pub trait CompatibleDigestItem: Sized {
Show 18 methods // Required methods fn subspace_pre_digest<AccountId: Encode>( pre_digest: &PreDigest<FarmerPublicKey, AccountId>, ) -> Self; fn as_subspace_pre_digest<AccountId: Decode>( &self, ) -> Option<PreDigest<FarmerPublicKey, AccountId>>; fn subspace_seal(signature: FarmerSignature) -> Self; fn as_subspace_seal(&self) -> Option<FarmerSignature>; fn pot_slot_iterations(pot_slot_iterations: NonZeroU32) -> Self; fn as_pot_slot_iterations(&self) -> Option<NonZeroU32>; fn solution_range(solution_range: SolutionRange) -> Self; fn as_solution_range(&self) -> Option<SolutionRange>; fn pot_parameters_change(pot_parameters_change: PotParametersChange) -> Self; fn as_pot_parameters_change(&self) -> Option<PotParametersChange>; fn next_solution_range(solution_range: SolutionRange) -> Self; fn as_next_solution_range(&self) -> Option<SolutionRange>; fn segment_commitment( segment_index: SegmentIndex, segment_commitment: SegmentCommitment, ) -> Self; fn as_segment_commitment(&self) -> Option<(SegmentIndex, SegmentCommitment)>; fn enable_solution_range_adjustment_and_override( override_solution_range: Option<SolutionRange>, ) -> Self; fn as_enable_solution_range_adjustment_and_override( &self, ) -> Option<Option<SolutionRange>>; fn root_plot_public_key_update( root_plot_public_key: Option<FarmerPublicKey>, ) -> Self; fn as_root_plot_public_key_update(&self) -> Option<Option<FarmerPublicKey>>;
}
Expand description

A digest item which is usable with Subspace consensus.

Required Methods§

source

fn subspace_pre_digest<AccountId: Encode>( pre_digest: &PreDigest<FarmerPublicKey, AccountId>, ) -> Self

Construct a digest item which contains a Subspace pre-digest.

source

fn as_subspace_pre_digest<AccountId: Decode>( &self, ) -> Option<PreDigest<FarmerPublicKey, AccountId>>

If this item is an Subspace pre-digest, return it.

source

fn subspace_seal(signature: FarmerSignature) -> Self

Construct a digest item which contains a Subspace seal.

source

fn as_subspace_seal(&self) -> Option<FarmerSignature>

If this item is a Subspace signature, return the signature.

source

fn pot_slot_iterations(pot_slot_iterations: NonZeroU32) -> Self

Number of iterations for proof of time per slot, corresponds to slot that directly follows parent block’s slot and can change before slot for which block is produced

source

fn as_pot_slot_iterations(&self) -> Option<NonZeroU32>

If this item is a Subspace proof of time slot iterations, return it.

source

fn solution_range(solution_range: SolutionRange) -> Self

Construct a digest item which contains a solution range.

source

fn as_solution_range(&self) -> Option<SolutionRange>

If this item is a Subspace solution range, return it.

source

fn pot_parameters_change(pot_parameters_change: PotParametersChange) -> Self

Change of parameters to apply to PoT chain

source

fn as_pot_parameters_change(&self) -> Option<PotParametersChange>

If this item is a Subspace proof of time change of parameters, return it.

source

fn next_solution_range(solution_range: SolutionRange) -> Self

Construct a digest item which contains next solution range.

source

fn as_next_solution_range(&self) -> Option<SolutionRange>

If this item is a Subspace next solution range, return it.

source

fn segment_commitment( segment_index: SegmentIndex, segment_commitment: SegmentCommitment, ) -> Self

Construct a digest item which contains segment commitment.

source

fn as_segment_commitment(&self) -> Option<(SegmentIndex, SegmentCommitment)>

If this item is a Subspace segment commitment, return it.

source

fn enable_solution_range_adjustment_and_override( override_solution_range: Option<SolutionRange>, ) -> Self

Construct digest item than indicates enabling of solution range adjustment and override next solution range.

source

fn as_enable_solution_range_adjustment_and_override( &self, ) -> Option<Option<SolutionRange>>

If this item is a Subspace Enable solution range adjustment and override next solution range, return it.

source

fn root_plot_public_key_update( root_plot_public_key: Option<FarmerPublicKey>, ) -> Self

Construct digest item that indicates update of root plot public key.

source

fn as_root_plot_public_key_update(&self) -> Option<Option<FarmerPublicKey>>

If this item is a Subspace update of root plot public key, return it.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl CompatibleDigestItem for DigestItem

source§

fn subspace_pre_digest<RewardAddress: Encode>( pre_digest: &PreDigest<FarmerPublicKey, RewardAddress>, ) -> Self

source§

fn as_subspace_pre_digest<RewardAddress: Decode>( &self, ) -> Option<PreDigest<FarmerPublicKey, RewardAddress>>

source§

fn subspace_seal(signature: FarmerSignature) -> Self

source§

fn as_subspace_seal(&self) -> Option<FarmerSignature>

source§

fn pot_slot_iterations(pot_slot_iterations: NonZeroU32) -> Self

source§

fn as_pot_slot_iterations(&self) -> Option<NonZeroU32>

source§

fn solution_range(solution_range: SolutionRange) -> Self

source§

fn as_solution_range(&self) -> Option<SolutionRange>

source§

fn pot_parameters_change(pot_parameters_change: PotParametersChange) -> Self

source§

fn as_pot_parameters_change(&self) -> Option<PotParametersChange>

source§

fn next_solution_range(solution_range: SolutionRange) -> Self

source§

fn as_next_solution_range(&self) -> Option<SolutionRange>

source§

fn segment_commitment( segment_index: SegmentIndex, segment_commitment: SegmentCommitment, ) -> Self

source§

fn as_segment_commitment(&self) -> Option<(SegmentIndex, SegmentCommitment)>

source§

fn enable_solution_range_adjustment_and_override( maybe_override_solution_range: Option<SolutionRange>, ) -> Self

source§

fn as_enable_solution_range_adjustment_and_override( &self, ) -> Option<Option<SolutionRange>>

source§

fn root_plot_public_key_update( root_plot_public_key: Option<FarmerPublicKey>, ) -> Self

source§

fn as_root_plot_public_key_update(&self) -> Option<Option<FarmerPublicKey>>

Implementors§