pub enum PmRepayRejection {
Show 16 variants
Unavailable,
NonceOutOfBounds,
NonceReused,
UnknownUnderlying,
Unauthorized,
AccountUnhealthy,
RecoveryInProgress,
NothingOwed,
InvalidAmount,
BelowMinimum,
ExceedsOwed,
InsufficientWithdrawable,
Rejected,
NotManager,
InvalidNonce,
SignatureVerificationFailed,
}Expand description
A stable error code POST /v1/pm-financing/repay returns. Read it from a
ClientError with PmRepayRejection::from_error.
Variants§
Voluntary repayment is off on this deployment (503).
NonceOutOfBounds
The nonce is outside the engine’s time bounds (409). Sign again.
NonceReused
The nonce is bound to a different signed request (409).
UnknownUnderlying
underlying names none of the account’s loans or unpaid settlements
(400).
The signer is not the account’s engine-indexed manager (403).
AccountUnhealthy
The account is below maintenance or being liquidated (409). Matches
PmRepaymentBlockedReason::AccountUnhealthy.
RecoveryInProgress
Another recovery of the account is active (409). Matches
PmRepaymentBlockedReason::RecoveryInProgress.
NothingOwed
Nothing is owed (409).
InvalidAmount
The amount is not a positive whole micro-USDC amount (400).
BelowMinimum
An exact amount below the instance minimum that does not repay everything owed (400).
ExceedsOwed
The amount exceeds what is owed (409).
InsufficientWithdrawable
The amount exceeds the unreserved withdrawable USDC (409).
Rejected
The engine refused it without a more specific code (422).
NotManager
The signer is not the account’s current Account.sol manager (403).
InvalidNonce
The API’s nonce time-bound check failed (409). Sign again.
SignatureVerificationFailed
The signature does not recover to wallet.
Implementations§
Source§impl PmRepayRejection
impl PmRepayRejection
pub const ALL: [Self; 16]
Sourcepub fn from_code(code: &str) -> Option<Self>
pub fn from_code(code: &str) -> Option<Self>
The rejection a server code names, if it is one of these.
Sourcepub fn from_error(error: &ClientError) -> Option<Self>
pub fn from_error(error: &ClientError) -> Option<Self>
The rejection a failed HypercallClient::repay_pm_loan carries, if
the server named one.
Sourcepub fn is_resignable(self) -> bool
pub fn is_resignable(self) -> bool
Whether signing the same request again with a fresh nonce may succeed without anything else changing.
Trait Implementations§
Source§impl Clone for PmRepayRejection
impl Clone for PmRepayRejection
impl Copy for PmRepayRejection
Source§impl Debug for PmRepayRejection
impl Debug for PmRepayRejection
impl Eq for PmRepayRejection
Source§impl PartialEq for PmRepayRejection
impl PartialEq for PmRepayRejection
impl StructuralPartialEq for PmRepayRejection
Auto Trait Implementations§
impl Forget for PmRepayRejection
impl Freeze for PmRepayRejection
impl Move for PmRepayRejection
impl RefUnwindSafe for PmRepayRejection
impl Send for PmRepayRejection
impl Sync for PmRepayRejection
impl Unpin for PmRepayRejection
impl UnsafeUnpin for PmRepayRejection
impl UnwindSafe for PmRepayRejection
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 more