pub enum ValidationErrorKind {
InvalidSigner,
LowValue(HoprBalance),
LowWinProb(WinningProbability),
ChannelClosed(ChannelId),
EpochMismatch(u32),
IndexTooLow(u64),
InsufficientFunds(ChannelId, HoprBalance),
}Expand description
Contains all possible validation errors that can occur during ticket validation.
Variants§
InvalidSigner
Ticket signer does not match the sender.
LowValue(HoprBalance)
Ticket amount is lower than the given minimum value.
LowWinProb(WinningProbability)
Ticket winning probability is lower than the given minimum value.
ChannelClosed(ChannelId)
The given channel is closed or pending to close.
EpochMismatch(u32)
Ticket epoch does not match the given channel epoch.
IndexTooLow(u64)
Ticket index is lower than the given channel ticket index.
InsufficientFunds(ChannelId, HoprBalance)
Not enough funds in the given channel to pay for the ticket.
Trait Implementations§
Source§impl AsRef<str> for ValidationErrorKind
impl AsRef<str> for ValidationErrorKind
Source§impl Clone for ValidationErrorKind
impl Clone for ValidationErrorKind
Source§fn clone(&self) -> ValidationErrorKind
fn clone(&self) -> ValidationErrorKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationErrorKind
impl Debug for ValidationErrorKind
Source§impl Display for ValidationErrorKind
impl Display for ValidationErrorKind
Source§impl Error for ValidationErrorKind
impl Error for ValidationErrorKind
1.30.0 · 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()
impl Copy for ValidationErrorKind
Auto Trait Implementations§
impl Freeze for ValidationErrorKind
impl RefUnwindSafe for ValidationErrorKind
impl Send for ValidationErrorKind
impl Sync for ValidationErrorKind
impl Unpin for ValidationErrorKind
impl UnwindSafe for ValidationErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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