pub(crate) struct DeclareAffidavit<T: Config> {
pub by: T::Public,
pub at: BlockNumberFor<T>,
}Expand description
Operational context for affidavit declaration and key rotation.
This type represents the contextual information required to declare an affidavit using the active affidavit key and rotate it to the next key during the routine lifecycle.
Declaration is a sequential, retry-driven routine that executes as part of the looped offchain workflow. It is entered only after the initialization phase guarantees that a active-tagged affidavit key-pair is available, and after the election phase has either completed successfully or been safely skipped due to unmet constraints.
§Notes
- This is not a transaction payload.
- This type is never submitted on-chain.
- It is used internally during:
- next affidavit key resolution
- declaration payload composition (including next public key for rotation)
- payload signing using the active affidavit key-pair
- submission of the declare-affidavit extrinsic
§Dependency: InitAffidavitKey and optimistic TryElection
This routine has a hard dependency on the initialization phase and a soft (optimistic) dependency on the election phase.
It requires that:
- a active-tagged affidavit key exists in offchain storage and
the its key-pair in local keystore (guaranteed by
InitAffidavitKey), and - election has either completed successfully or has been safely skipped due to unmet constraints.
Election may execute before declaration as part of the global retry loop,
but its outcome does not directly gate declaration correctness. However,
failures during election invalidate system invariants and therefore
redirect control back to InitAffidavitKey for repair and re-validation
before declaration is retried.
§Fork Awareness
- The
atfield captures the block number at which the declaration process begins. - When executed via offchain workers, this context must tolerate forks, re-orgs, and speculative execution.
- Implementors must ensure idempotency and re-entrancy safety.
§Declaration Flow
The routine fetches the active-tagged affidavit key-pair, resolves the next affidavit key (mirroring the affidavit-key-initialization logic), verifies the declaration window and eligibility, composes the declaration payload along with the next affidavit public key, signs it with the active affidavit key-pair, and submits the declaration transaction to rotate the active affidavit key to next affidavit key.
Failures or inconsistencies re-enter the initialization phase to re-validate offchain storage and keystore invariants.
loop {
// Ensure active-tagged affidavit key-pair is available
InitAffidavitKey::ensure_active_affidavit_key();
// Fetch affidavit key pair (offchain storage reference + keystore-pair)
let key_pair = fetch_affidavit_key_pair();
// Attempt election optimistically; failure requires repair + retry
if TryElection::attempt_election_if_applicable().is_err() {
continue; // re-enter initialization phase
}
// Resolve next affidavit key using the offchain-storage references +
// keystore pair consistency guarantees as InitAffidavitKey
if !offchain_storage.has_next_affidavit_key()
|| !keystore.has_next_affidavit_key()
{
keystore.create_or_repair_next_affidavit_key();
offchain_storage.ensure_next_affidavit_key_reference();
continue; // retry until next key reaches consistency
}
let next_key_to_rotate = fetch_next_affidavit_key();
if !within_affidavit_window() || !eligible_to_declare() {
continue; // retry via initialization phase
}
let payload = compose_declare_affidavit_payload(next_key_to_rotate);
match sign_payload_with(key_pair)
.and_then(|payload| submit_declare_affidavit_extrinsic(payload)) {
Ok(_) => break, // declaration + rotation completed
Err(_) => continue, // retry via initialization phase
}
}§Guarantee
This routine declares the affidavit and rotates the active key only when:
- a active-tagged affidavit key-pair is available,
- the next affidavit key is initiated and present in the local keystore,
- declaration window and eligibility constraints are satisfied,
- and the declaration transaction is successfully submitted.
In all other cases, the routine retries by re-entering the affidavit key initialization phase to repair and re-validate offchain storage and keystore consistency.
All behavior is supplied by trait implementations operating on this type.
§FlowChart
Fields§
§by: T::PublicRaw application public key identifying the affidavit key-pair in the local keystore.
at: BlockNumberFor<T>Block number at which the affidavit declaration process started.
Used exclusively for logging and diagnostic purposes.
Trait Implementations§
Source§impl<T: Clone + Config> Clone for DeclareAffidavit<T>where
T::Public: Clone,
impl<T: Clone + Config> Clone for DeclareAffidavit<T>where
T::Public: Clone,
Source§fn clone(&self) -> DeclareAffidavit<T>
fn clone(&self) -> DeclareAffidavit<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T> Debug for DeclareAffidavit<T>
impl<T> Debug for DeclareAffidavit<T>
Source§impl<T: Config> Decode for DeclareAffidavit<T>where
T::Public: Decode,
BlockNumberFor<T>: Decode,
impl<T: Config> Decode for DeclareAffidavit<T>where
T::Public: Decode,
BlockNumberFor<T>: Decode,
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Source§impl<T: Config> Encode for DeclareAffidavit<T>where
T::Public: Encode,
BlockNumberFor<T>: Encode,
impl<T: Config> Encode for DeclareAffidavit<T>where
T::Public: Encode,
BlockNumberFor<T>: Encode,
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Source§impl<T: Config> FinalizedOffchainStorageError<T, <T as Config>::AccountId> for DeclareAffidavit<T>
Finality-specific invariant errors for the next affidavit key.
impl<T: Config> FinalizedOffchainStorageError<T, <T as Config>::AccountId> for DeclareAffidavit<T>
Finality-specific invariant errors for the next affidavit key.
These errors are emitted when semantic inconsistencies are detected between fork-aware and persistent storage layers.
Such conditions indicate partial or invalid state, and the storage layer automatically performs cleanup before returning these errors.
Source§fn hanging_hash() -> Self::Error
fn hanging_hash() -> Self::Error
Emitted when a speculative fork-aware hash exists without a corresponding persistent ledger entry.
Source§fn hanging_value() -> Self::Error
fn hanging_value() -> Self::Error
Emitted when persistent storage contains no value corresponding to an existing speculative (fork-aware) hash.
Source§impl<T: Config> FinalizedPolicy<T> for DeclareAffidavit<T>
Finality evaluation policy for the next affidavit key.
impl<T: Config> FinalizedPolicy<T> for DeclareAffidavit<T>
Finality evaluation policy for the next affidavit key.
This implementation reuses the finality parameters defined by
InitAffidavitKey, ensuring that both the active and next
affidavit keys are evaluated under identical confidence guarantees.
§Design Rationale
Every routine that uses Finalized storage:
- must define exactly one finality policy, and
- that policy is scoped to the routine, not to the storage backend.
Since the next affidavit key participates in the same operational lifecycle as the active affidavit key (generation -> observation -> rotation), it is intentionally governed by the same time- and observation-based confidence thresholds.
§Invariants
Finalizedstorage is strictly constrained:- one logical value per routine,
- one finality policy per value.
- Unlike
ForkAwareorPersistentstorage backends,Finalizeddoes not allow multiple independent values or heterogeneous policies.
Reusing the policy from InitAffidavitKey preserves these invariants
while avoiding duplicated configuration and potential divergence.
Source§fn finality_after() -> <T as Config>::Moment
fn finality_after() -> <T as Config>::Moment
Wall-clock delay required before confidence evaluation begins.
Source§fn finality_ticks() -> BlockNumberFor<T>
fn finality_ticks() -> BlockNumberFor<T>
Number of block-scoped observations required to reach strong confidence.
Source§impl<T: Config> MaxEncodedLen for DeclareAffidavit<T>where
T::Public: MaxEncodedLen,
BlockNumberFor<T>: MaxEncodedLen,
impl<T: Config> MaxEncodedLen for DeclareAffidavit<T>where
T::Public: MaxEncodedLen,
BlockNumberFor<T>: MaxEncodedLen,
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Source§impl<T: Config> OffchainStorageError<ForkAware<T, ValueHash, DeclareAffidavit<T>, Pallet<T>>> for DeclareAffidavit<T>
Error policy for fork-aware speculative storage of the next affidavit key.
impl<T: Config> OffchainStorageError<ForkAware<T, ValueHash, DeclareAffidavit<T>, Pallet<T>>> for DeclareAffidavit<T>
Error policy for fork-aware speculative storage of the next affidavit key.
This implementation defines how storage-layer failures originating
from fork-aware offchain storage are surfaced as
routine-specific DispatchError values.
These errors relate exclusively to the speculative identity
(ValueHash) used to track the next affidavit key across forks.
Any failure reported here:
- is logged exactly once by the storage layer,
- and returned unchanged to the caller.
Source§fn decode_failed() -> Self::Error
fn decode_failed() -> Self::Error
Returned when decoding the speculative hash fails.
Indicates corrupted or unexpected fork-local storage state.
Source§fn concurrent_mutation() -> Self::Error
fn concurrent_mutation() -> Self::Error
Returned when a concurrent mutation of the speculative hash is detected.
Indicates overlapping OCW executions or race conditions.
Source§impl<T: Config> OffchainStorageError<Persistent<T, Ledger<T, <T as Config>::AccountId>, DeclareAffidavit<T>>> for DeclareAffidavit<T>
Error policy for persistent finalized storage of the next affidavit key.
impl<T: Config> OffchainStorageError<Persistent<T, Ledger<T, <T as Config>::AccountId>, DeclareAffidavit<T>>> for DeclareAffidavit<T>
Error policy for persistent finalized storage of the next affidavit key.
This implementation defines error signaling for failures that occur
while interacting with the persistent observation ledger backing
the Finalized storage model.
These errors concern the finalized value and its observation history, not speculative fork-local state.
Source§fn decode_failed() -> Self::Error
fn decode_failed() -> Self::Error
Returned when decoding the persistent ledger entry fails.
Indicates corrupted or incompatible persisted offchain data.
Source§fn concurrent_mutation() -> Self::Error
fn concurrent_mutation() -> Self::Error
Returned when a concurrent mutation of the persistent ledger is detected.
Indicates contention between multiple OCW executions.
Source§impl<T: Config> RoutineOf<<T as SigningTypes>::Public, <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for DeclareAffidavit<T>
Declares the authorization requirements for the DeclareAffidavit routine.
impl<T: Config> RoutineOf<<T as SigningTypes>::Public, <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for DeclareAffidavit<T>
Declares the authorization requirements for the DeclareAffidavit routine.
This implementation specifies who is permitted to execute the routine at a given point in time.
The routine is restricted to the node’s active affidavit key. This ensures that affidavit declarations are signed only by the currently designated, rotated operational key, rather than by long-term authority or stash keys.
The returned T::Public value represents the concrete public key that
must be used to sign the affidavit payload at the given block number.
Source§fn who(at: &BlockNumberFor<T>) -> Result<T::Public, Self::Logger>
fn who(at: &BlockNumberFor<T>) -> Result<T::Public, Self::Logger>
Determines which public key is authorized to execute this routine.
§Why this check exists
Affidavit declarations are security-sensitive operations. To reduce the blast radius of key compromise and to support regular key rotation, only the currently active affidavit key is permitted to authorize this routine.
The active affidavit key:
- is stored and ensured by
Finalizedoffchain storage, - is expected to have a corresponding key pair in the node’s keystore,
- and must be explicitly initialized before this routine can run.
§Failure semantics
- Any storage inconsistency is treated as a hard error, since it indicates corrupted or unexpected node state.
- If no active affidavit key is configured, the caller is considered misconfigured and execution is refused.
- If the active affidavit key exists but the corresponding key pair is missing from the keystore, execution is refused.
Source§impl<T: Config> Routines<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for DeclareAffidavit<T>
Offchain routine responsible for affidavit declaration and
preparing key rotation for the next election cycle.
impl<T: Config> Routines<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for DeclareAffidavit<T>
Offchain routine responsible for affidavit declaration and preparing key rotation for the next election cycle.
§What an affidavit represents
Declaring an affidavit signals that an author:
- is ready to participate in the upcoming election, and
- satisfies all protocol-defined requirements (e.g. backing, support).
An affidavit:
- is submitted via an unsigned extrinsic,
- is allowed only within a bounded affidavit window, and
- is restricted to valid authors holding the correct operational role.
§Responsibilities of this routine
This OCW routine performs the offchain coordination required to:
- Verify that affidavit submission is currently permitted.
- Ensure a next affidavit key exists and is finalized.
- Submit the
declareextrinsic using the active affidavit key. - Attach the next affidavit key for rotation into the upcoming session.
§Key separation and security
- Long-term authority / stash keys are never used here.
- All signing is performed using ephemeral affidavit keys managed via application crypto and rotated regularly.
- This minimizes the blast radius of key compromise and enables strict lifecycle enforcement.
§Execution model
This routine is designed to be optimistic and non-blocking:
- It may be executed before the node has fully completed validation
via
validateextrinsic. - Runtime-side checks ultimately decide whether the extrinsic succeeds.
- Failures are logged and retried automatically in later OCW executions.
This makes the routine safe to run repeatedly without risking inconsistent on-chain state.
Source§fn can_run(&self) -> Result<(), Self::Logger>
fn can_run(&self) -> Result<(), Self::Logger>
Determines whether the affidavit declaration routine may proceed.
§Semantics
- Ensures that a next affidavit key exists in finalized offchain storage, else initiates and finalizes one.
- Verifies that the current affidavit key is eligible to submit an affidavit in the runtime.
§Key handling
- The active affidavit key (
self.by) must already exist in the node’s keystore. - Author primary keys are never consulted.
§Optimistic execution
This function may be called before the author has successfully
executed the on-chain validate.
That is safe because:
- Runtime-side checks enforce correctness.
- This routine merely prepares and submits the transaction.
If the author has not yet validated their affidavit key on-chain, the submission will be rejected harmlessly.
Source§fn run_service(&self) -> Result<(), Self::Logger>
fn run_service(&self) -> Result<(), Self::Logger>
Submits the declare extrinsic.
§Preconditions
- The active affidavit key is authorized and present in the keystore.
- The next affidavit key exists and has reached sufficient finality.
§Behavior
- Signs the affidavit payload using the current affidavit key.
- Includes the next affidavit key for rotation.
- Submits the extrinsic to the transaction pool.
§Important notes
- This routine does not apply any on-chain state changes itself.
- It only submits a transaction; actual effects occur later during block execution.
- Any failure is logged and retried in future OCW runs.
Source§fn on_ran_service(&self)
fn on_ran_service(&self)
Logs a info message on a successful DeclareAffidavit routine.
Source§impl<T> TypeInfo for DeclareAffidavit<T>where
T::Public: TypeInfo + 'static,
BlockNumberFor<T>: TypeInfo + 'static,
T: Config + 'static,
impl<T> TypeInfo for DeclareAffidavit<T>where
T::Public: TypeInfo + 'static,
BlockNumberFor<T>: TypeInfo + 'static,
T: Config + 'static,
impl<T: Config> EncodeLike for DeclareAffidavit<T>where
T::Public: Encode,
BlockNumberFor<T>: Encode,
impl<T: Eq + Config> Eq for DeclareAffidavit<T>where
T::Public: Eq,
impl<T: Config> StructuralPartialEq for DeclareAffidavit<T>
Auto Trait Implementations§
impl<T> Freeze for DeclareAffidavit<T>
impl<T> RefUnwindSafe for DeclareAffidavit<T>where
<T as SigningTypes>::Public: RefUnwindSafe,
<<<T as Config>::Block as Block>::Header as Header>::Number: RefUnwindSafe,
impl<T> Send for DeclareAffidavit<T>where
<T as SigningTypes>::Public: Send,
impl<T> Sync for DeclareAffidavit<T>where
<T as SigningTypes>::Public: Sync,
impl<T> Unpin for DeclareAffidavit<T>
impl<T> UnwindSafe for DeclareAffidavit<T>where
<T as SigningTypes>::Public: UnwindSafe,
<<<T as Config>::Block as Block>::Header as Header>::Number: UnwindSafe,
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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Self and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere
T: Codec,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T, U, Tag> IntoTag<U, Tag> for Twhere
U: FromTag<T, Tag>,
Tag: DiscriminantTag,
impl<T, U, Tag> IntoTag<U, Tag> for Twhere
U: FromTag<T, Tag>,
Tag: DiscriminantTag,
§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
Source§impl<T, Time> Logging<Time> for Twhere
Time: Time,
impl<T, Time> Logging<Time> for Twhere
Time: Time,
Source§const FALLBACK_TARGET: &'static str = "routine"
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
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
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
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
Source§fn info(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
fn info(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
Source§fn warn(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
fn warn(
err: &Self::Logger,
timestamp: Timestamp,
target: Option<&str>,
fmt: Option<fn(Timestamp, &Self::Level, &str, &str) -> String>,
) -> Self::Loggerwhere
Self: Sized,
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read more§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
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 Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.