pub enum ContractError {
NotFound(String),
PolicyViolation(String),
RiskLimitExceeded {
limit: String,
current: f64,
max: f64,
},
ApprovalRequired(String),
ApprovalDenied(String),
ConditionNotMet(String),
ObligationUnfulfilled(String),
ContractExpired(String),
InvalidContract(String),
FileFormat(String),
Io(Error),
Serialization(Error),
}Expand description
Errors that can occur in contract operations.
Variants§
NotFound(String)
Entity not found by ID.
PolicyViolation(String)
Policy violation detected.
RiskLimitExceeded
Risk limit exceeded.
ApprovalRequired(String)
Approval is required for this action.
ApprovalDenied(String)
Approval was denied.
ConditionNotMet(String)
Condition not met.
ObligationUnfulfilled(String)
Obligation unfulfilled.
ContractExpired(String)
Contract has expired.
InvalidContract(String)
Invalid contract definition.
FileFormat(String)
File format error.
Io(Error)
IO error.
Serialization(Error)
Serialization error.
Trait Implementations§
Source§impl Debug for ContractError
impl Debug for ContractError
Source§impl Display for ContractError
impl Display for ContractError
Source§impl Error for ContractError
impl Error for ContractError
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<ContractError> for SisterError
impl From<ContractError> for SisterError
Source§fn from(e: ContractError) -> Self
fn from(e: ContractError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ContractError
impl From<Error> for ContractError
Auto Trait Implementations§
impl Freeze for ContractError
impl !RefUnwindSafe for ContractError
impl Send for ContractError
impl Sync for ContractError
impl Unpin for ContractError
impl UnsafeUnpin for ContractError
impl !UnwindSafe for ContractError
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