Struct Pallet

Source
pub struct Pallet<T>(PhantomData<T>);
Expand description

Primary Marker type for the Chain Manager pallet.

This pallet provides implementations for traits from blockchain, roles, session, offences

Implemented traits:

Tuple Fields§

§0: PhantomData<T>

Implementations§

Source§

impl<T: Config> Pallet<T>

Source

pub fn validate( origin: OriginFor<T>, payload: ValidatePayloadOf<T>, _signature: T::Signature, ) -> DispatchResult

Register an author’s new affidavit signing key for the upcoming session’s participation as a validator.

This extrinsic allows an author to declare their off-chain signing key that will be used to sign affidavits for the next session’s election.

It ensures that only valid and available authors can register keys.

§Notes
  • Affidavit Keys are session-specific and are updated each session.
  • This extrinsic allows submission of affidavit for next session only.
  • Affidavit Declaration/Submission will rotate keys once every submission for further sessions then.
§Errors

Returns a DispatchError if author-role authorization fails.

Source

pub fn declare( origin: OriginFor<T>, payload: AffidavitPayloadOf<T>, _signature: T::Signature, ) -> DispatchResult

Submit an affidavit for the upcoming session election.

This extrinsic allows an author to declare their election weights (affidavit) for the next session. It also rotates the author’s signing key for the subsequent affidavit.

§Parameters
  • origin: Must be a signed account corresponding to the author submitting the affidavit.
  • payload: The payload that was signed off-chain representing the affidavit data.
  • signature: The author’s signature of the payload, used for verification.
  • new_key: A new affidavit signing key to replace the current one for the next upcoming session.
§Notes
  • Affidavit submissions are session-specific.
  • Key rotation ensures authors maintain fresh signing keys for security.
  • Only validated and available authors can submit affidavits.
§Errors

Returns a DispatchError if un-privileged to submit an affidavit.

Source

pub fn elect( origin: OriginFor<T>, payload: ElectionPayloadOf<T>, _signature: T::Signature, ) -> DispatchResult

Execute the election for the upcoming session.

This extrinsic allows an author to act as the election runner for the election session (next-session). It verifies the author’s affidavit-based signature, prepares the election using all submitted affidavits, and records the runner for audit and reward attribution.

Since this is an unsigned extrinsic, it is constructed and submitted by validator offchain workers (OCWs).

Although unsigned, it is treated as a pseudo-inherent:

  • It is authorized via affidavit signature verification
  • It may carry rewards for successfully running the election
  • It is expected to be submitted locally by validators rather than propagated by external transaction authors
§Errors

Returns a DispatchError if election execution or authorization fails.

Source

pub fn chill( origin: OriginFor<T>, affidavit_pub: AffidavitId<T>, ) -> DispatchResult

Request to step back or “chill” immediately from election participation by erasing affidavit keys.

This safely avoids penalties by pausing an author’s duties.

This extrinsic allows an author to withdraw from participating in upcoming elections or prevent submitting future affidavits. The actual effect depends on the current block relative to the affidavit submissions and election windows.

Note that its always advised to chill validation before resign author role to skip unnecessary invalid affidavit declarations.

§Parameters
  • origin: Must be a signed account corresponding to the author i.e., controller/role account.
  • affidavit_pub : Public affidavit key registered for a new session’s affidavit submission.
§Notes
  • Removing affidavit keys ensures authors cannot unfairly influence future elections.
  • By inspecting returned errors, callers can compute the optimal chill window.
§Errors

Returns a DispatchError with diagnostic in case of irrevocable duties assigned.

Source

pub fn force_genesis_config( origin: OriginFor<T>, field: ForceGenesisConfig<T>, ) -> DispatchResult

Force-update a selected genesis configuration parameter.

Origin: Root only.

This extrinsic allows privileged modification of runtime parameters that were originally defined at genesis.

  • AllowAffidavits - Enables or disables affidavit submission.
  • AffidavitBeginsAt - Updates the start of the affidavit submission window.
  • AffidavitEndsAt - Updates the end of the affidavit submission window.
  • ElectionBeginsAt - Updates when election execution begins within the session.
  • ElectionRunnerPointsUpgrade - Updates the reward points for election runners.
  • ValidateTxPriority - Updates the priority for validation-related extrinsics.
  • ElectionTxPriority - Updates the priority for election execution extrinsics.
  • AffidavitTxPriority - Updates the priority for affidavit submission extrinsics.
  • FinalityAfter - Updates the time-based delay before operations are considered final.
  • FinalityTicks - Updates the block-based confirmation threshold for finality.

The call enforces consistency constraints where applicable:

  • Affidavit window ordering:
    • AffidavitBeginsAt < AffidavitEndsAt
    • AffidavitEndsAt > AffidavitBeginsAt
  • The following values must be non-zero:
    • transaction priorities
    • finality thresholds (FinalityAfter, FinalityTicks)

This call directly overwrites storage and emits an event containing the updated configuration variant.

Source§

impl<T: Config> Pallet<T>

Source

pub fn can_chill( author: AuthorOf<T>, affidavit_pub: AffidavitId<T>, ) -> DispatchResult

Returns Ok(()) if the author is permitted to submit the Self::chill extrinsic using the given affidavit key.

Performs a read-only pre-check verifying that chilling does not conflict with any active or pending duty. The check branches on which session scope the key belongs to:

  • Next affidavit session (current + 2): author has already declared and rotated. Chilling is allowed only after the election window closes and the author is not in the revealed elected set.

  • Next session (current + 1): author has registered but may not have declared yet. Chilling is allowed before the affidavit window or after it closes without a declaration. Rejected if a declaration exists but the key is stale relative to the expected post-rotation key.

§Parameters
  • author: The author requesting to chill.
  • affidavit_pub: The affidavit key registered via Self::validate or rotated during Self::declare.
§Returns
  • Ok(()) if chilling is permitted.
  • Err(ValidatorCannotChill) if the author is active in the current session.
  • Err(CandidateCannotChill) if the election window is still open.
  • Err(ElectedCannotChill) if the author appears in the revealed elected set.
  • Err(InvalidRotatedAffidavitKey) if a declaration exists but the key is stale.
  • Err(DispatchError) for ownership, timing, or configuration violations.
Source

pub fn can_validate(author: AuthorOf<T>) -> DispatchResult

Returns Ok(()) if the author is eligible to submit a Self::validate extrinsic.

Performs a pre-check for validation readiness by verifying that:

  • the author is not already an active validator in the current session,
  • the author exists in the role system via Config::RoleAdapter, and
  • the author is currently marked as available.

Intended for use by offchain workers and RPC consumers before constructing and submitting a Self::validate extrinsic.

§Parameters
  • author: The author whose validation eligibility is being checked.
§Returns
  • Ok(()) if all conditions for validation readiness are satisfied.
  • Err(ActivelyValidating) if the author is already in the active validator set.
  • Err(DispatchError) if the role check or availability check fails.
Source

pub fn is_validating(author: AuthorOf<T>) -> bool

Returns true if the author is an active validator in the current session.

Converts the author identifier into its session-specific validator id using the configured [Convert] implementation, then checks whether that validator appears in the current session’s active validator set via [pallet_session].

Returns false if the author-to-validator conversion fails, as the runtime cannot determine validator status without a valid session identity.

§Parameters
  • author: The author whose active validation status is being checked.
Source

pub fn is_chilling(author: AuthorOf<T>) -> bool

Returns true if the author has no registered affidavit key in any relevant future session scope and is therefore in a chilled state.

This is the logical inverse of Self::is_pursuing and delegates directly to Self::get_runtime_afdt_key.

§Parameters
  • author: The author whose chilling status is being checked.
Source

pub fn get_runtime_afdt_key( author: AuthorOf<T>, ) -> Result<(SessionIndex, AffidavitId<T>), DispatchError>

Retrieve the author’s registered affidavit key and its associated session from the two relevant future session scopes.

Searches across:

  • the next affidavit session (current + 2), checked first, and
  • the next session (current + 1), checked second.

The next affidavit session is checked first because a key stored there indicates a more advanced lifecycle state: the author has already declared an affidavit for the next session and rotated to a fresh key for the session after.

§Parameters
  • author: The author whose registered affidavit key is being retrieved.
§Returns
  • Ok((session, affidavit_key)) if a key owned by the author is found in either future session scope.
  • Err(AffidavitKeyPairNotFound) if no registered key exists for the author.
Source

pub fn get_public_key( afdt_key: AffidavitId<T>, ) -> Result<T::Public, DispatchError>

Resolve an affidavit account identifier to its corresponding public key in the node-local keystore.

Iterates all locally available affidavit application keys, derives the account-form identifier for each, and returns the public key whose derived account matches the provided afdt_key.

§Parameters
  • afdt_key: The affidavit account identifier to resolve.
§Returns
  • Ok(public_key) if a matching key is found in the local keystore.
  • Err(AfdtPublicKeyNotFound) if no locally held key derives to the given identifier.
§Note

This function reads from the node-local keystore and may return different results across nodes depending on which keys each node holds.

Source

pub fn get_finalized_afdt_key() -> Result<AffidavitId<T>, DispatchError>

Retrieve the currently finalized active affidavit key from node-local offchain storage.

Reads the active affidavit key using finalized offchain storage semantics and returns it only when its confidence level is Confidence::Safe. Keys that exist but have not yet reached safe confidence are rejected, as they may still be subject to re-org.

§Returns
  • Ok(key) if a finalized key exists and is marked as Confidence::Safe.
  • Err(ActiveAfdtKeyFinalizedHangingValue) if a finalized value exists without a corresponding fork-aware reference.
  • Err(ActiveAfdtKeyNotYetFinalized) if the key exists but has not yet reached safe confidence.
  • Err(DispatchError) if the offchain storage read itself fails.
§Note

This value is maintained in node-local offchain storage and is not part of on-chain state. Results may differ across nodes.

Source

pub fn sign_validate_payload() -> Result<(ValidatePayloadOf<T>, T::Signature), DispatchError>

Construct and sign a ValidatePayload using the currently finalized active affidavit key from node-local offchain storage.

Performs the following steps in sequence:

The resulting payload and signature are the exact inputs required by the Self::validate extrinsic.

§Returns
  • Ok((payload, signature)) if the key is finalized, locally available, and signing succeeds.
  • Err(CannotSignValidateTxPayload) if signing fails.
  • Err(DispatchError) if key retrieval or resolution fails.
§Note

This function reads from node-local offchain storage and the local keystore. Results are node-specific and may differ across validators.

Source

pub fn get_elects() -> Result<ElectionElects<T>, DispatchError>

Retrieve the currently revealed elected author set from the election manager.

Delegates to ElectAuthors::reveal and returns the result as a concrete ElectionElects value.

This function does not trigger or re-run an election. It only reads the result of the most recently completed election preparation. If no election has been executed or the result is unavailable, it returns an error.

§Returns
  • Ok(ElectionElects) containing the elected author set.
  • Err(UnableToRevealElected) if no election result is currently available.
Source

pub fn fetch_affidavit( afdt_id: AffidavitId<T>, ) -> Result<ElectionVia<T>, DispatchError>

Retrieve the submitted affidavit for a given affidavit identifier targeting the upcoming session’s election.

Resolves the affidavit key to its owning author, then returns the author’s declared election weights for the next session (current + 1).

§Parameters
  • afdt_id: The affidavit key identifier to look up.
§Returns
  • Ok(ElectionVia) containing the author’s declared election weights.
  • Err(DispatchError) otherwise.
Source

pub fn fetch_affidavit_for( afdt_id: AffidavitId<T>, session: SessionIndex, ) -> Result<ElectionVia<T>, DispatchError>

Retrieve the submitted affidavit for a given affidavit identifier targeting a specific session.

Unlike Self::fetch_affidavit, which always targets the upcoming session, this function allows querying affidavits for any session by index. It resolves the affidavit key to its registered author for the given session, then returns that author’s declared election weights.

§Parameters
  • afdt_id: The affidavit key identifier to look up.
  • session: The session index for which the affidavit is queried.
§Returns
  • Ok(ElectionVia) containing the author’s declared election weights for the session.
  • Err(AffidavitKeyPairNotFound) if the key is not registered for the given session.
  • Err(AffidavitNotFound) if the author has not submitted an affidavit for that session.
Source

pub fn is_contesting(author: AuthorOf<T>) -> bool

Returns true if the author has submitted an affidavit and is actively contesting the upcoming session’s election.

An author is considered contesting when a valid affidavit entry exists in storage for the next session (current + 1). This indicates that the author has declared election weights and is a candidate for selection.

§Parameters
  • author: The author whose election candidacy is being checked.
§Returns
  • true if the author has a stored affidavit for the upcoming session.
  • false otherwise, including when the author has never submitted an affidavit or has withdrawn.
Source

pub fn is_pursuing(author: AuthorOf<T>) -> bool

Returns true if the author is actively pursuing validation by maintaining a registered affidavit key for a future session.

An author is considered pursuing when they have a registered affidavit key in either the next session or the next affidavit session scope, meaning they have not chilled and intend to participate in upcoming elections.

This is the logical inverse of Self::is_chilling.

§Parameters
  • author: The author whose pursuit status is being checked.
§Returns
  • true if the author holds an affidavit key for any relevant future session.
  • false if the author has no registered keys and is effectively chilled.
Source

pub fn can_declare(afdt_id: AffidavitId<T>) -> DispatchResult

Returns Ok(()) if the author identified by the given affidavit key is eligible to submit an affidavit declaration for the upcoming session.

This function performs a full pre-check for the Self::declare extrinsic, verifying that:

  • the affidavit key is registered for the upcoming session,
  • the global AllowAffidavits flag is enabled,
  • the author associated with the key is available in the role system, and
  • the current block falls within the configured affidavit submission window.

Intended for use by offchain workers and RPC consumers to determine whether an affidavit declaration can be safely submitted at the current block.

§Parameters
  • afdt_id: The affidavit key identifier to evaluate.
§Returns
  • Ok(()) if all conditions for affidavit submission are satisfied.
  • Err(DispatchError) otherwise.
Source

pub fn can_elect(author: AuthorOf<T>) -> DispatchResult

Returns Ok(()) if the given author is eligible to submit an election extrinsic at the current block.

This function performs a full pre-check for the Self::elect extrinsic, verifying that:

  • the current block has an identifiable block author,
  • the provided author matches the current block author, and
  • the current block falls within the configured election window.

Only the block author may run the election for a given block, ensuring that election submissions cannot be spoofed by non-producing validators.

§Parameters
  • author: The author asserting eligibility to run the election.
§Returns
  • Ok(()) if the author is the current block author and the election window is open.
  • Err(DispatchError) otherwise.
Source

pub fn compute_affidavit_window() -> Result<AffidavitWindow<T>, DispatchError>

Computes the affidavit submission window for the current session.

The window is derived from the session start and average session length:

start = session_start + (affidavit_begins_at * avg_session_length)
end   = session_start + (affidavit_ends_at   * avg_session_length)

Note: affidavit_begins_at and affidavit_ends_at are percentages of the session length and are applied to compute block offsets.

§Returns
  • Ok(AffidavitWindow) containing start and end blocks
  • DispatchError otherwise
§Notes
  • The resulting window is session-relative and recalculated each session.
  • Affidavits submitted outside this window should be rejected.
Source

pub fn compute_election_window() -> Result<ElectionWindow<T>, DispatchError>

Computes the election window for the current session.

The election window is a sub-range of the affidavit window:

start = affidavit_start + (election_begins_at * (affidavit_end - affidavit_start))
end   = affidavit_end

Note:

  • election_begins_at is a percentage of the affidavit window range.
  • The election always ends when the affidavit window ends.
§Diagram
|--------- Affidavit Window ---------|
|------|-----------------------------|
       ^                             ^
  election_start               election_end (= affidavit_end)
§Returns
  • Ok(ElectionWindow) containing start and end blocks
  • DispatchError otherwise
Source§

impl<T: Config> Pallet<T>

Source

pub(crate) fn deposit_event(event: Event<T>)

Trait Implementations§

Source§

impl<T: Config> AuthorPoints<<T as Config>::AccountId, <T as Config>::Points> for Pallet<T>

Implementation of the AuthorPoints trait for the pallet.

This implementation provides a session-scoped accounting layer for tracking and querying abstract points accumulated by authors during active validation.

Points represent good behaviour signals, specifically block production contributions, and serve as inputs to downstream reward and incentive mechanisms. They are not assets themselves and carry no immediate economic value.

§Design Notes
  • Points are scoped per session and never aggregated across sessions.
  • Accumulation is monotonic within a session.
  • Each point corresponds to a unit of block production activity.
  • Points are intentionally retained after session end for:
    • Auditability
    • Historical analysis
    • Deterministic reward calculation
  • This layer is deterministic and side-effect minimal.
§Implementation Notes
  • This implementation does not perform reward distribution.
  • Economic interpretation of points is delegated to RewardAuthors.
  • Clearing of points is intentionally unsupported at this layer.
Source§

fn points_of(author: &AuthorOf<T>) -> Result<T::Points, DispatchError>

Returns the total accumulated points for an author in the current session.

§Semantics
  • Points are accumulated incrementally during the session.
  • Each point reflects a block production contribution.
  • Calling this function mid-session returns a partial total.
  • Calling this function at session end yields the final value used for reward calculation.
§Errors
  • Returns DispatchError if the author has not accumulated any points in the current session.
Source§

fn clear_points()

No-op method for clearing accumulated points.

Point data is retained indefinitely to:

  • Preserve full historical traceability
  • Support deterministic audits
  • Avoid accidental data loss before reward finalization

Any future clearing, pruning, or archival must be performed via explicit governance or maintenance extrinsics.

Source§

fn set_points(author: &AuthorOf<T>, points: T::Points) -> DispatchResult

Sets the points for an author in the current session.

§Semantics
  • Overwrites the existing points value for the author.
  • Acts as the primitive storage write for point updates.
§Notes
  • Typically used internally by higher-level operations such as Self::add_point.
Source§

fn iter_points() -> impl Iterator<Item = (AuthorOf<T>, T::Points)>

Returns an iterator over all authors and their accumulated points for the current session.

§Semantics
  • Provides a complete view of the session-scoped points state.
  • Includes all authors who have accumulated at least one point.
  • The iterator reflects the current state and may change as new points are added during the session.
§Usage
  • Intended for runtime operations such as:
    • Reward computation
    • Ranking or selection
    • Performance evaluation
§Notes
  • Any clearing, pruning, or archival is the responsibility of external logic (e.g., governance or maintenance extrinsics).
Source§

fn add_point(author: &Author) -> Result<(), DispatchError>

Adds a single point to a given author. Read more
Source§

impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>

Source§

fn before_all_runtime_migrations() -> Weight

Something that should happen before runtime migrations are executed.
Source§

impl<T: Config> Callable<T> for Pallet<T>

Source§

impl<T> Clone for Pallet<T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Config> Convert<<T as Config>::AccountId, Option<<T as Config>::ValidatorId>> for Pallet<T>

Source§

fn convert(a: AuthorOf<T>) -> Option<SessionId<T>>

Converts a valid Author to an Result<SessionId, DispatchError>

None if no SessionId found

Source§

impl<T> Debug for Pallet<T>

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Config> DispatchViewFunction for Pallet<T>

Source§

fn dispatch_view_function<O: Output>( id: &ViewFunctionId, input: &mut &[u8], output: &mut O, ) -> Result<(), ViewFunctionDispatchError>

Source§

impl<T: Config> ElectionAffidavits<<T as Config>::AccountId, <<T as Config>::ElectionAdapter as ElectionManager<<T as Config>::AccountId>>::ElectionWeightOf> for Pallet<T>

Implementation of the ElectionAffidavits trait for the pallet.

This implementation bridges the generic ElectionAffidavits abstraction with the pallet’s internal affidavit registry (AuthorAffidavits & AffidavitKeys), enabling authors to self-report their election weights for upcoming sessions.

§Design Notes
  • Affidavit submission is only allowed when AllowAffidavits is enabled.
  • Affidavits are stored per session, not globally, ensuring clean rotation.
  • Time gating is enforced through AffidavitBeginsAt and AffidavitEndsAt, relative to average session length.
  • Affidavit data is immutable within its session once the submission period ends.
  • All operations must remain audit-safe and deterministic.
§Implementation Notes

This bridge layer does not perform any ranking, scoring, or weighting logic. Those responsibilities remain with the ElectAuthors and ElectionManager implementations. The affidavit simply represents a candidate’s declaration of intent and associated metrics for the next election round.

Source§

fn can_submit_affidavit(who: &AffidavitId<T>) -> DispatchResult

Checks whether an author can submit an affidavit for the upcoming session-election.

  • The global AllowAffidavits flag is enabled.
  • The current block is within the configured affidavit submission window.

DispatchError otherwise

Source§

fn submit_affidavit( who: &AffidavitId<T>, affidavit: &ElectionVia<T>, ) -> DispatchResult

Submits a new affidavit for the next session.

Directly inserts the affidavit into storage for the upcoming session.

§Details
  • Persists the affidavit under the next session’s affidavits mapping.
  • Overwrites any previously submitted affidavit for the same session.
  • Each author can maintain only one recent affidavit per future session.
Source§

fn gen_affidavit(who: &AffidavitId<T>) -> Result<ElectionVia<T>, DispatchError>

Generates an affidavit dynamically for the given author’s affidavit ID.

§Overview
§Returns
  • Ok(ElectionVia) on success.
  • DispatchError otherwise
Source§

fn remove_affidavit(who: &AffidavitId<T>) -> DispatchResult

Removes an existing upcoming-election affidavit for the given author.

§Workflow
  1. Ensures the affidavit exists.
  2. Removes it from storage for the next session.
§Notes
  • Used primarily when an author wishes to withdraw from election participation.
Source§

fn get_affidavit(who: &AffidavitId<T>) -> Result<ElectionVia<T>, DispatchError>

Retrieves an affidavit for the given author for the next session’s election.

§Returns
  • The ElectionVia structure associated with the author.
  • DispatchError if no affidavit is stored for the next session election.
Source§

fn affidavit_exists(who: &AffidavitId<T>) -> DispatchResult

Checks if an affidavit exists for the given author for the upcoming election.

§Returns
  • Ok(()) if the affidavit exists.
  • DispatchError otherwise.
Source§

fn clear_affidavits()

No-op method.

This low-level implementation is intentionally left empty.

Affidavit clearing is deferred to higher-level logic to:

  • Preserve full historical traceability.
  • Prevent accidental data loss before election finalization.
§Notes
  • The pallet should query affidavits per session only once.
  • Re-querying beyond this point can cause election inconsistencies.
  • Reserved for potential audit or archival extensions.
Source§

fn on_submit_affidavit(who: &AffidavitId<T>, _affidavit: &ElectionVia<T>)

Hook invoked after a successful affidavit submission.

This hook emits the AffidavitSubmitted event, reflecting the submitted election weight for the author.

Source§

fn process_affidavit(who: &Author) -> Result<(), DispatchError>

Processes the full lifecycle of an affidavit submission for a given author for the next election cycle. Read more
Source§

impl<T: Config> ForksHandler<T, ForkLocalDepot> for Pallet<T>

Implements the fork graph management for this pallet’s offchain worker.

Binds the pallet to the ForksHandler trait using ForkLocalDepot as the scope type, wiring fork graph constants and error variants defined in Config and Error into the fork resolution and recovery logic.

This impl is the prerequisite for calling ForksHandler::start inside Hooks::offchain_worker, which resolves the current fork branch before any routine executes.

Source§

const TAG: &[u8] = b"pallet_chain_manager"

Storage namespace prefix for all fork-local keys. Read more
Source§

const MAX_FORKS: u32 = T::MAX_FORKS

Maximum sibling forks allowed from a single branch point. Read more
Source§

const MAX_RECOVER_TRAVERSAL: u32 = T::MAX_FORK_RECOVERY_TRAVERSAL

Maximum reverse traversal attempts during recovery. Read more
Source§

fn max_forks_error() -> DispatchError

Error returned when fork creation exceeds Self::MAX_FORKS.
Source§

fn forks_not_enabled() -> DispatchError

Returns the error used when fork-aware storage is accessed before ForksHandler::start has initialized the fork graph.
Source§

fn inconsistent_forks() -> DispatchError

Returns the error used when the fork graph is in an inconsistent state.
Source§

fn start<F>( target: Option<&str>, fmt: Option<fn(<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, &Self::Level, &str, &str) -> String>, ocw: F, )
where F: FnOnce(),

Start fork resolution for the previous block and execute OCW logic inside the resolved branch environment. Read more
Source§

fn get_head() -> Option<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>

Returns the highest known longest-chain boundary used for fork detection. Read more
Source§

fn get_branch_hash(hash: <T as Config>::Hash) -> Option<[u8; 32]>

Returns the fork-branch key-hash for a persisted block hash. Read more
Source§

fn get_block_branch(hash: <T as Config>::Hash) -> Option<Branch<T, S>>

Returns the resolved fork-branch data for a persisted block hash. Read more
Source§

fn get_branch(branch_hash: &[u8]) -> Option<Branch<T, S>>

Loads a branch directly from its branch hash (key).
Source§

fn get_prev_branch(hash: <T as Config>::Hash) -> Option<Branch<T, S>>

Returns the structural parent branch of a resolved block. Read more
Source§

fn get_prev_block_branch() -> Option<Branch<T, S>>

Source§

fn get_divider(hash: <T as Config>::Hash) -> Option<[u8; 32]>

Returns the divider for a persisted block hash. Read more
Source§

fn transition(branch: &Branch<T, S>, action: ForkAction) -> Option<Branch<T, S>>

Deterministic traversal across persisted local fork branches. Read more
Source§

fn gen_scope_item_key(item: &<S as Accrete>::Item) -> [u8; 32]

Derives a 32-byte scope key for a given scope item. Read more
Source§

fn scope_item_exists( key: &[u8; 32], target: Option<&str>, fmt: Option<fn(<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, &Self::Level, &str, &str) -> String>, ) -> Result<bool, Self::Logger>

Returns true if the given scope key exists in the current fork’s branch. Read more
Source§

fn add_to_scope( item: <S as Accrete>::Item, target: Option<&str>, fmt: Option<fn(<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, &Self::Level, &str, &str) -> String>, ) -> Result<[u8; 32], Self::Logger>

Registers a scope item in the local scope of the current branch. Read more
Source§

fn remove_from_scope( key: &[u8; 32], target: Option<&str>, fmt: Option<fn(<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, &Self::Level, &str, &str) -> String>, ) -> Result<(), Self::Logger>

Removes a scope item from the current branch’s local or inherited scope. Read more
Source§

fn parent_branch_hash_unavailable( block: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, _target: Option<&str>, _fmt: Option<fn(<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, &Self::Level, &str, &str) -> String>, ) -> Result<(), Self::Logger>

Recovery path when a target block’s parent block does not have a resolvable branch available. Read more
Source§

fn parent_branch_unavailable( block: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, target: Option<&str>, fmt: Option<fn(<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, &Self::Level, &str, &str) -> String>, ) -> Result<(), Self::Logger>

Recovery path when a divider exists for a target block’s (N-1) parent (N-2) but the resolved branch data is missing. Read more
Source§

fn inherited_branch_mutation_conflict( block: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, target: Option<&str>, fmt: Option<fn(<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, &Self::Level, &str, &str) -> String>, ) -> Result<(), Self::Logger>

Recovery path when optimistic branch mutation fails due to concurrent OCW modification. Read more
Source§

fn parent_divider_unavailable( block: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, target: Option<&str>, fmt: Option<fn(<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, &Self::Level, &str, &str) -> String>, ) -> Result<(), Self::Logger>

Recovery path when divider routing is missing for the target block’s (N-1) parent (N-2). Read more
Source§

fn inherited_branch_decode_error( block: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, target: Option<&str>, fmt: Option<fn(<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, &Self::Level, &str, &str) -> String>, ) -> Result<(), Self::Logger>

Recovery path when branch decoding fails for the target block’s (N-1) inherited branch from parent (N-2) for extension. Read more
Source§

fn max_forks( block: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, target: Option<&str>, fmt: Option<fn(<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, &Self::Level, &str, &str) -> String>, ) -> Result<(), Self::Logger>

Triggered when no additional sibling branch slot can be allocated under the configured limit as the sibling of the target block’s (N-1) parent (N-2). Read more
Source§

impl<T: Config> GetStorageVersion for Pallet<T>

Source§

type InCodeStorageVersion = NoStorageVersionSet

This type is generated by the pallet macro. Read more
Source§

fn in_code_storage_version() -> Self::InCodeStorageVersion

Returns the in-code storage version as specified in the storage_version attribute, or [NoStorageVersionSet] if the attribute is missing.
Source§

fn on_chain_storage_version() -> StorageVersion

Returns the storage version of the pallet as last set in the actual on-chain storage.
§

fn current_storage_version() -> Self::InCodeStorageVersion

👎Deprecated: This method has been renamed to in_code_storage_version and will be removed after March 2024.
DEPRECATED: Use [Self::current_storage_version] instead. Read more
Source§

impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

Source§

fn offchain_worker(block: BlockNumberFor<T>)

Offchain Worker entry point coordinating affidavit lifecycle and elections.

This function acts as a deterministic orchestrator for a sequence of structured offchain routines, executed once per block in best-effort mode. It does not implement business logic itself; instead, it delegates all responsibility to well-defined Routines and RoutineOf abstractions.

§Execution Model

All routines execute inside ForksHandler::start, which resolves and persists the current fork graph branch before any routine runs. Each routine calls Routines::run_service directly, followed by Routines::on_ran_service on success. The routines are executed imperatively and sequentially with fail-fast semantics:

  1. Initialize the node-local active affidavit key (if required).
  2. Attempt to run the election early (if the election window permits).
  3. Declare an affidavit for the upcoming session (if eligible).
  4. Rotate affidavit keys for the next session.

If any routine fails, execution stops immediately for the current block. All failures are already logged by the routine itself; the OCW hook performs no retries, compensation, or error interpretation.

§Semantics & Guarantees
  • Best-effort execution: no transactional rollback is assumed.
  • Idempotent by design: repeated execution across blocks or forks is safe.
  • Authorization-aware: each routine explicitly determines its authorized signer via RoutineOf::who before execution.
  • Fork-safe: correctness is preserved across re-orgs through fork-aware (frame_suite::ForkAware) and finalized (frame_suite::Finalized) offchain storage semantics.
§Notes
  • This function intentionally returns early on failure.
  • All observability is provided via structured logging inside routines.
  • Progress is achieved through repeated OCW invocations over time.
Source§

fn on_initialize(_block: BlockNumberFor<T>) -> Weight

Called at the beginning of each block.

Awards block production points to the current block author.

§

fn on_finalize(_n: BlockNumber)

Block finalization hook. This is called at the very end of block execution. Read more
§

fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight

Hook to consume a block’s idle time. This will run when the block is being finalized (before [Hooks::on_finalize]). Read more
§

fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)

A hook to run logic after inherent application. Read more
§

fn on_runtime_upgrade() -> Weight

Hook executed when a code change (aka. a “runtime upgrade”) is detected by the FRAME Executive pallet. Read more
§

fn integrity_test()

Check the integrity of this pallet’s configuration. Read more
Source§

impl<T: Config> IntegrityTest for Pallet<T>

Source§

fn integrity_test()

See [Hooks::integrity_test].
Source§

impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

Source§

fn offchain_worker(n: BlockNumberFor<T>)

This function is being called after every block import (when fully synced). Read more
Source§

impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

Source§

fn on_finalize(n: BlockNumberFor<T>)

See [Hooks::on_finalize].
Source§

impl<T: Config> OnGenesis for Pallet<T>

Source§

fn on_genesis()

Something that should happen at genesis.
Source§

impl<T: Config> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

Source§

fn on_idle(n: BlockNumberFor<T>, remaining_weight: Weight) -> Weight

See [Hooks::on_idle].
Source§

impl<T: Config> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

Source§

fn on_initialize(n: BlockNumberFor<T>) -> Weight

See [Hooks::on_initialize].
Source§

impl<T: Config> OnOffenceHandler<<T as Config>::AccountId, (<T as Config>::ValidatorId, <T as Config>::FullIdentification), Weight> for Pallet<T>
where AuthorOf<T>: From<<T as Config>::ValidatorId>,

Integration with Substrate’s offence reporting system.

This implementation bridges Substrate’s session-level offence detection with the pallet’s author-level penalty scheduling via the PenalizeAuthors interface.

Offences reported by the session pallet are translated into author identifiers and penalty inputs, which are then scheduled for enforcement by the pallet’s penalty subsystem.

Source§

fn on_offence( offenders: &[OffenceDetails<OffenceReporter<T>, Offender<T>>], slash_fractions: &[PenaltyRatio], _session: SessionIndex, ) -> Weight

Handles reported offences for the current session.

§Workflow
  • Convert session-level offenders into local author identifiers.
  • Map each offence to its corresponding penalty fraction.
  • Schedule penalties via the pallet’s penalty subsystem PenalizeAuthors::penalize_authors.
§Semantics
  • Penalties are scheduled, not enforced immediately.
  • Final enforcement timing and transformation (e.g. scaling, caps, aggregation) are governed by the configured penalty plugin model Config::PenaltyModel.
  • This handler performs no additional offence validation beyond the guarantees already provided by Substrate.
Source§

impl<T: Config> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>

Source§

fn on_poll(n: BlockNumberFor<T>, weight: &mut WeightMeter)

Code to execute every now and then at the beginning of the block after inherent application. Read more
Source§

impl<T: Config> OnRuntimeUpgrade for Pallet<T>

Source§

fn on_runtime_upgrade() -> Weight

See [Hooks::on_runtime_upgrade].
Source§

impl<T: Config> PalletInfoAccess for Pallet<T>

Source§

fn index() -> usize

Index of the pallet as configured in the runtime.
Source§

fn name() -> &'static str

Name of the pallet as configured in the runtime.
Source§

fn name_hash() -> [u8; 16]

Two128 hash of name.
Source§

fn module_name() -> &'static str

Name of the Rust module containing the pallet.
Source§

fn crate_version() -> CrateVersion

Version of the crate containing the pallet.
Source§

impl<T: Config> PalletsInfoAccess for Pallet<T>

Source§

fn count() -> usize

The number of pallets’ information that this type represents. Read more
Source§

fn infos() -> Vec<PalletInfoData>

All of the pallets’ information that this type represents.
Source§

impl<T> PartialEq for Pallet<T>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: Config> RoleActivity<<T as Config>::AccountId, <<T as Config>::RoleAdapter as RoleManager<<T as Config>::AccountId>>::TimeStamp> for Pallet<T>

Implementation of the RoleActivity trait for authors.

This implementation determines whether an author is currently idle / active or blocked by an active protocol duty.

§Design Notes
  • Activity is computed dynamically on each invocation.
  • No state is cached or persisted.
  • Time gating is derived from session timing and affidavit windows.
§Caller Responsibility
  • Callers must handle the returned AuthorActivity and propagate its associated [DispatchError] to the user for exit solutions.
Source§

type Activity = AuthorActivity<T>

Represents the duty, the author is currently performing.

Source§

fn is_idle(who: &AuthorOf<T>) -> Result<(), AuthorActivity<T>>

Determines whether an author is currently idle or blocked by an active duty.

§Semantics
  • Returns Ok(()) if the author is idle
  • Returns Err(AuthorActivity) describing the blocking duty
Source§

fn is_active(who: &Candidate) -> Result<Self::Activity, ()>

Returns Ok(Activity) if the candidate is active, where Activity describes the duty being performed. Read more
Source§

impl<T: Config> SessionManager<<T as Config>::AccountId> for Pallet<T>

Implementation of [SessionManager] for the pallet.

This implementation integrates author election, reward settlement, and session boundary tracking into Substrate’s session lifecycle.

It acts as the coordination layer between:

§Design Notes
  • Elections always target the next session.
  • Rewards are settled for the ending session.
  • Session state is updated deterministically at boundaries.
  • No election logic or reward computation is performed here.
§Implementation Notes
  • This implementation assumes election results are already finalized before new_session is invoked.
  • All side effects are session-boundary safe and audit-friendly.
Source§

fn new_session(new_index: SessionIndex) -> Option<Vec<AuthorOf<T>>>

Prepares the author set for the upcoming session.

§Workflow
  • Reveal elected authors via ElectAuthors::reveal.
  • Reward the election runner with additional block points for the previous session.
§Semantics
  • Returns None if:
    • No election was executed, or
    • The elected author set is empty.
  • Election runner rewards are credited to the session that is ending (new_index - 1).
Source§

fn end_session(_end_index: SessionIndex)

Finalizes the ending session.

§Workflow
  • Schedule rewards for authors based on accumulated points.
  • Apply any pending configuration upgrades related to election runner incentives.
§Notes
  • Reward scheduling is deferred; no immediate transfers occur.
  • Configuration upgrades take effect atomically at session end.
Source§

fn start_session(start_index: SessionIndex)

Initializes metadata for the newly started session.

§Workflow
  • Record the new session index.
  • Capture the block number at which the session begins.
§Invariants
  • Must be called exactly once per session start.
  • Session metadata is monotonic and never rewritten.
§

fn new_session_genesis(new_index: u32) -> Option<Vec<ValidatorId>>

Same as new_session, but it this should only be called at genesis. Read more
Source§

impl<T: Config> StorageInfoTrait for Pallet<T>

Source§

fn storage_info() -> Vec<StorageInfo>

Source§

impl<T: Config> ValidateUnsigned for Pallet<T>

Source§

type Call = Call<T>

The call to validate
Source§

fn validate_unsigned( _source: TransactionSource, call: &Self::Call, ) -> TransactionValidity

Return the validity of the call Read more
§

fn pre_dispatch(call: &Self::Call) -> Result<(), TransactionValidityError>

Validate the call right before dispatch. Read more
Source§

impl<T: Config> ViewFunctionIdPrefix for Pallet<T>

Source§

fn prefix() -> [u8; 16]

Source§

impl<T: Config> WhitelistedStorageKeys for Pallet<T>

Source§

fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>

Returns a Vec<TrackedStorageKey> indicating the storage keys that should be whitelisted during benchmarking. This means that those keys will be excluded from the benchmarking performance calculation.
Source§

impl<T> Eq for Pallet<T>

Auto Trait Implementations§

§

impl<T> Freeze for Pallet<T>

§

impl<T> RefUnwindSafe for Pallet<T>
where T: RefUnwindSafe,

§

impl<T> Send for Pallet<T>
where T: Send,

§

impl<T> Sync for Pallet<T>
where T: Sync,

§

impl<T> Unpin for Pallet<T>
where T: Unpin,

§

impl<T> UnwindSafe for Pallet<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CheckedConversion for T

§

fn checked_from<T>(t: T) -> Option<Self>
where Self: TryFrom<T>,

Convert from a value of T into an equivalent instance of Option<Self>. Read more
§

fn checked_into<T>(self) -> Option<T>
where Self: TryInto<T>,

Consume self to return Some equivalent value of Option<T>. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

§

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

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

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

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T, U> IntoKey<U> for T
where U: FromKey<T>,

§

fn into_key(self) -> U

Source§

impl<T, U, Tag> IntoTag<U, Tag> for T
where U: FromTag<T, Tag>, Tag: DiscriminantTag,

Source§

fn into_tag(self) -> U

§

impl<Src, Dest> IntoTuple<Dest> for Src
where Dest: FromTuple<Src>,

§

fn into_tuple(self) -> Dest

§

impl<T> IsType<T> for T

§

fn from_ref(t: &T) -> &T

Cast reference.
§

fn into_ref(&self) -> &T

Cast reference.
§

fn from_mut(t: &mut T) -> &mut T

Cast mutable reference.
§

fn into_mut(&mut self) -> &mut T

Cast mutable reference.
§

impl<T, Outer> IsWrappedBy<Outer> for T
where Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

Source§

impl<T, Time> Logging<Time> for T
where Time: Time,

Source§

const FALLBACK_TARGET: &'static str = "routine"

Default logging target if none is provided.

Most routines, especially offchain workers or background tasks, use this target for simplicity.

It allows a consistent place to look for routine logs without requiring every call to specify a target.

Note: This target is only a conveninence and may be somewhat vague. To ensure errors can still be traced accurately, the logged messages should include additional metadata (e.g., module name, error index, or contextual info) so that the source of the error can be identified even if the target is generic.

Source§

type Logger = DispatchError

The type taken and returned for logging.

We simply return the same [DispatchError] that was logged, so logging does not change control flow or error propagation.

DispatchError is used because in Substrate it encompasses all runtime errors - including module errors, token errors, arithmetic issues, and transactional boundaries - making it the universal substrate-side error representation.

Source§

type Level = LogLevel

The log level type.

We use the LogLevel enum to standardize severity levels (Info, Warn, Error, Debug) across all routine logs.

Source§

fn log( level: <T as Logging<Time>>::Level, err: &<T as Logging<Time>>::Logger, timestamp: Time, target: Option<&str>, fmt: Option<fn(Time, &<T as Logging<Time>>::Level, &str, &str) -> String>, ) -> <T as Logging<Time>>::Logger

Core logging function that all helpers delegate to. Read more
Source§

fn info( err: &Self::Logger, timestamp: Timestamp, target: Option<&str>, fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>, ) -> Self::Logger
where Self: Sized,

Logs an info-level message. Read more
Source§

fn warn( err: &Self::Logger, timestamp: Timestamp, target: Option<&str>, fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>, ) -> Self::Logger
where Self: Sized,

Logs a warning-level message. Read more
Source§

fn error( err: &Self::Logger, timestamp: Timestamp, target: Option<&str>, fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>, ) -> Self::Logger
where Self: Sized,

Logs an error-level message. Read more
Source§

fn debug( err: &Self::Logger, timestamp: Timestamp, target: Option<&str>, fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>, ) -> Self::Logger
where Self: Sized,

Logs a debug-level message. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SaturatedConversion for T

§

fn saturated_from<T>(t: T) -> Self
where Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
§

fn saturated_into<T>(self) -> T
where Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T, U> TryIntoKey<U> for T
where U: TryFromKey<T>,

§

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

§

fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>

§

impl<S, T> UncheckedInto<T> for S
where T: UncheckedFrom<S>,

§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
§

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,

§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<Provider, Discriminant, T> DelegateVirtualDynBound<Provider, Discriminant> for T
where Provider: VirtualDynBound<Discriminant>, Discriminant: DiscriminantTag,

Source§

impl<Provider, Discriminant, T> DelegateVirtualStaticBound<Provider, Discriminant> for T
where Provider: VirtualStaticBound<Discriminant>, Discriminant: DiscriminantTag,

§

impl<T> JsonSchemaMaybe for T

§

impl<T> MaybeDebug for T
where T: Debug,

§

impl<T> MaybeRefUnwindSafe for T
where T: RefUnwindSafe,

§

impl<T> Member for T
where T: Send + Sync + Debug + Eq + PartialEq + Clone + 'static,