pub trait CommitErrorHandler {
type Error: RuntimeError;
// Required method
fn from_commit_error(e: CommitError) -> Self::Error;
}Expand description
A trait for mapping domain-level Commitment errors into caller- or pallet-specific error types.
This trait acts as a bridge between the generic, FRAME-agnostic
CommitError enum and the concrete error type expected by the
execution context.
Required Associated Types§
Sourcetype Error: RuntimeError
type Error: RuntimeError
Concrete error type produced by the handler.
Implements conversion to [DispatchError].
Required Methods§
Sourcefn from_commit_error(e: CommitError) -> Self::Error
fn from_commit_error(e: CommitError) -> Self::Error
Converts a generic CommitError into the handler’s
concrete error type which implements Into<DispatchError>.
This function centralizes error translation logic and ensures that all balance-related failures are surfaced consistently according to the caller’s error domain.
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.