pub enum ReputationError {
Show 27 variants
Database(Error),
Validation(String),
InvalidRating(String),
InvalidScoreDelta {
delta: Decimal,
max_allowed: Decimal,
},
InvalidStateTransition {
from: String,
to: String,
},
UserNotFound(String),
CommitmentNotFound(String),
TokenNotFound(String),
DisputeNotFound(String),
SBTNotFound(String),
Unauthorized(String),
CannotRateOwnToken,
InsufficientBalance {
required: Decimal,
current: Decimal,
},
InsufficientHoldingDuration {
required_hours: i64,
held_hours: i64,
},
CircuitBreakerTriggered(String),
InsufficientReputation {
required: Decimal,
current: Decimal,
},
CannotIssueTokens(String),
CommitmentAlreadyVerified,
CommitmentDeadlineExpired,
EvidenceRequired,
DisputeAlreadyResolved,
VotingPeriodEnded,
VotingPeriodNotEnded,
AlreadyVoted,
InsufficientVotingPower {
required: Decimal,
current: Decimal,
},
SBTAlreadyMinted(String),
SBTNotMinted(String),
}Expand description
All error types for the reputation system.
Variants§
Database(Error)
Underlying database error.
Validation(String)
A field or parameter failed validation.
InvalidRating(String)
Supplied rating value is outside the allowed range.
InvalidScoreDelta
Score delta exceeds the maximum allowed single-event change.
Fields
InvalidStateTransition
An entity cannot transition to the requested state from its current state.
UserNotFound(String)
Requested user was not found.
CommitmentNotFound(String)
Requested commitment was not found.
TokenNotFound(String)
Requested token was not found.
DisputeNotFound(String)
Requested dispute was not found.
SBTNotFound(String)
No SBT exists for the requested user.
The caller lacks permission to perform this action.
CannotRateOwnToken
A token holder attempted to rate a token they issued.
InsufficientBalance
Token holder’s balance is below the minimum required to submit a rating.
Fields
InsufficientHoldingDuration
Token holder has not held the token long enough to rate.
Fields
CircuitBreakerTriggered(String)
User’s reputation triggered the circuit breaker, blocking the operation.
InsufficientReputation
User’s reputation score is below the minimum required for this operation.
Fields
CannotIssueTokens(String)
User is not permitted to issue tokens due to reputation constraints.
CommitmentAlreadyVerified
The commitment has already been verified and cannot be verified again.
CommitmentDeadlineExpired
The commitment’s deadline has passed.
EvidenceRequired
Evidence must be submitted before this commitment can be verified.
DisputeAlreadyResolved
The dispute has already been resolved and cannot be modified.
VotingPeriodEnded
The dispute’s voting period has ended; no more votes can be cast.
VotingPeriodNotEnded
The dispute’s voting period has not yet ended.
AlreadyVoted
User has already cast a vote on this dispute.
InsufficientVotingPower
User’s voting power is below the minimum required to vote on this dispute.
SBTAlreadyMinted(String)
SBT already minted for this user; minting is idempotent.
SBTNotMinted(String)
SBT has not yet been minted for this user.
Trait Implementations§
Source§impl Debug for ReputationError
impl Debug for ReputationError
Source§impl Display for ReputationError
impl Display for ReputationError
Source§impl Error for ReputationError
impl Error for ReputationError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for ReputationError
impl !UnwindSafe for ReputationError
impl Freeze for ReputationError
impl Send for ReputationError
impl Sync for ReputationError
impl Unpin for ReputationError
impl UnsafeUnpin for ReputationError
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
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