pub enum SigningError {
ParseError(ParseError),
PolicyError(PolicyError),
SignError(SignError),
PolicyDenied {
reason: String,
},
}Expand description
Errors that can occur during the signing flow.
This enum covers all failure modes in the signing orchestration:
- Transaction parsing failures
- Policy evaluation failures
- Policy denial (transaction not allowed)
- Signing operation failures
Variants§
ParseError(ParseError)
Failed to parse the transaction.
The raw transaction bytes could not be decoded into a ParsedTx.
PolicyError(PolicyError)
Policy evaluation failed.
An error occurred while evaluating the policy rules, distinct from a policy denial. This typically indicates a configuration or system error.
SignError(SignError)
Signing operation failed.
The cryptographic signing operation failed.
PolicyDenied
Transaction denied by policy.
The transaction was rejected by one or more policy rules. The reason provides details about which rule denied it.
Implementations§
Source§impl SigningError
impl SigningError
Sourcepub fn policy_denied(reason: impl Into<String>) -> Self
pub fn policy_denied(reason: impl Into<String>) -> Self
Create a policy denied error with the given reason.
Sourcepub const fn is_policy_denied(&self) -> bool
pub const fn is_policy_denied(&self) -> bool
Returns true if this error is a policy denial.
Sourcepub fn denial_reason(&self) -> Option<&str>
pub fn denial_reason(&self) -> Option<&str>
Returns the denial reason if this is a policy denial.
Trait Implementations§
Source§impl Debug for SigningError
impl Debug for SigningError
Source§impl Display for SigningError
impl Display for SigningError
Source§impl Error for SigningError
impl Error for SigningError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ParseError> for SigningError
impl From<ParseError> for SigningError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<PolicyError> for SigningError
impl From<PolicyError> for SigningError
Source§fn from(source: PolicyError) -> Self
fn from(source: PolicyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SigningError
impl RefUnwindSafe for SigningError
impl Send for SigningError
impl Sync for SigningError
impl Unpin for SigningError
impl UnwindSafe for SigningError
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
Mutably borrows from an owned value. Read more