pub trait CompatibleDigestItem: Sized {
Show 18 methods
// Required methods
fn subspace_pre_digest<AccountId: Encode>(
pre_digest: &PreDigest<AccountId>,
) -> Self;
fn as_subspace_pre_digest<AccountId: Decode>(
&self,
) -> Option<PreDigest<AccountId>>;
fn subspace_seal(signature: RewardSignature) -> Self;
fn as_subspace_seal(&self) -> Option<RewardSignature>;
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<PublicKey>,
) -> Self;
fn as_root_plot_public_key_update(&self) -> Option<Option<PublicKey>>;
}
Expand description
A digest item which is usable with Subspace consensus.
Required Methods§
sourcefn subspace_pre_digest<AccountId: Encode>(
pre_digest: &PreDigest<AccountId>,
) -> Self
fn subspace_pre_digest<AccountId: Encode>( pre_digest: &PreDigest<AccountId>, ) -> Self
Construct a digest item which contains a Subspace pre-digest.
sourcefn as_subspace_pre_digest<AccountId: Decode>(
&self,
) -> Option<PreDigest<AccountId>>
fn as_subspace_pre_digest<AccountId: Decode>( &self, ) -> Option<PreDigest<AccountId>>
If this item is an Subspace pre-digest, return it.
sourcefn subspace_seal(signature: RewardSignature) -> Self
fn subspace_seal(signature: RewardSignature) -> Self
Construct a digest item which contains a Subspace seal.
sourcefn as_subspace_seal(&self) -> Option<RewardSignature>
fn as_subspace_seal(&self) -> Option<RewardSignature>
If this item is a Subspace signature, return the signature.
sourcefn pot_slot_iterations(pot_slot_iterations: NonZeroU32) -> Self
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
sourcefn as_pot_slot_iterations(&self) -> Option<NonZeroU32>
fn as_pot_slot_iterations(&self) -> Option<NonZeroU32>
If this item is a Subspace proof of time slot iterations, return it.
sourcefn solution_range(solution_range: SolutionRange) -> Self
fn solution_range(solution_range: SolutionRange) -> Self
Construct a digest item which contains a solution range.
sourcefn as_solution_range(&self) -> Option<SolutionRange>
fn as_solution_range(&self) -> Option<SolutionRange>
If this item is a Subspace solution range, return it.
sourcefn pot_parameters_change(pot_parameters_change: PotParametersChange) -> Self
fn pot_parameters_change(pot_parameters_change: PotParametersChange) -> Self
Change of parameters to apply to PoT chain
sourcefn as_pot_parameters_change(&self) -> Option<PotParametersChange>
fn as_pot_parameters_change(&self) -> Option<PotParametersChange>
If this item is a Subspace proof of time change of parameters, return it.
sourcefn next_solution_range(solution_range: SolutionRange) -> Self
fn next_solution_range(solution_range: SolutionRange) -> Self
Construct a digest item which contains next solution range.
sourcefn as_next_solution_range(&self) -> Option<SolutionRange>
fn as_next_solution_range(&self) -> Option<SolutionRange>
If this item is a Subspace next solution range, return it.
sourcefn segment_commitment(
segment_index: SegmentIndex,
segment_commitment: SegmentCommitment,
) -> Self
fn segment_commitment( segment_index: SegmentIndex, segment_commitment: SegmentCommitment, ) -> Self
Construct a digest item which contains segment commitment.
sourcefn as_segment_commitment(&self) -> Option<(SegmentIndex, SegmentCommitment)>
fn as_segment_commitment(&self) -> Option<(SegmentIndex, SegmentCommitment)>
If this item is a Subspace segment commitment, return it.
sourcefn enable_solution_range_adjustment_and_override(
override_solution_range: Option<SolutionRange>,
) -> Self
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.
sourcefn as_enable_solution_range_adjustment_and_override(
&self,
) -> Option<Option<SolutionRange>>
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.
sourcefn root_plot_public_key_update(root_plot_public_key: Option<PublicKey>) -> Self
fn root_plot_public_key_update(root_plot_public_key: Option<PublicKey>) -> Self
Construct digest item that indicates update of root plot public key.
sourcefn as_root_plot_public_key_update(&self) -> Option<Option<PublicKey>>
fn as_root_plot_public_key_update(&self) -> Option<Option<PublicKey>>
If this item is a Subspace update of root plot public key, return it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.