pub enum HoprProtocolError {
Show 14 variants
InvalidState(&'static str),
InvalidSender,
KeyNotFound,
OutOfFunds(ChannelId, HoprBalance),
ChannelNotFound(Address, Address),
UnacknowledgedTicketNotFound(HalfKeyChallenge),
DuplicateTicketIndex(ChannelId, u32, u64),
ResolverError(Error),
TicketFactoryError(Error),
TicketValidationError(TicketValidationError),
CoreTypesError(CoreTypesError),
PacketError(PacketError),
GeneralError(GeneralError),
SpawnError(SpawnError),
}Variants§
InvalidState(&'static str)
InvalidSender
KeyNotFound
OutOfFunds(ChannelId, HoprBalance)
ChannelNotFound(Address, Address)
UnacknowledgedTicketNotFound(HalfKeyChallenge)
DuplicateTicketIndex(ChannelId, u32, u64)
A ticket with this index (channel id, epoch, index) was already accepted and is still remembered by the replay tracker.
ResolverError(Error)
TicketFactoryError(Error)
TicketValidationError(TicketValidationError)
CoreTypesError(CoreTypesError)
PacketError(PacketError)
GeneralError(GeneralError)
SpawnError(SpawnError)
Implementations§
Source§impl HoprProtocolError
impl HoprProtocolError
Sourcepub const fn is_invalid_state(&self) -> bool
pub const fn is_invalid_state(&self) -> bool
Returns true if the enum is HoprProtocolError::InvalidState otherwise false
Sourcepub const fn is_invalid_sender(&self) -> bool
pub const fn is_invalid_sender(&self) -> bool
Returns true if the enum is HoprProtocolError::InvalidSender otherwise false
Sourcepub const fn is_key_not_found(&self) -> bool
pub const fn is_key_not_found(&self) -> bool
Returns true if the enum is HoprProtocolError::KeyNotFound otherwise false
Sourcepub const fn is_out_of_funds(&self) -> bool
pub const fn is_out_of_funds(&self) -> bool
Returns true if the enum is HoprProtocolError::OutOfFunds otherwise false
Sourcepub const fn is_channel_not_found(&self) -> bool
pub const fn is_channel_not_found(&self) -> bool
Returns true if the enum is HoprProtocolError::ChannelNotFound otherwise false
Sourcepub const fn is_unacknowledged_ticket_not_found(&self) -> bool
pub const fn is_unacknowledged_ticket_not_found(&self) -> bool
Returns true if the enum is HoprProtocolError::UnacknowledgedTicketNotFound otherwise false
Sourcepub const fn is_duplicate_ticket_index(&self) -> bool
pub const fn is_duplicate_ticket_index(&self) -> bool
Returns true if the enum is HoprProtocolError::DuplicateTicketIndex otherwise false
Sourcepub const fn is_resolver_error(&self) -> bool
pub const fn is_resolver_error(&self) -> bool
Returns true if the enum is HoprProtocolError::ResolverError otherwise false
Sourcepub const fn is_ticket_factory_error(&self) -> bool
pub const fn is_ticket_factory_error(&self) -> bool
Returns true if the enum is HoprProtocolError::TicketFactoryError otherwise false
Sourcepub const fn is_ticket_validation_error(&self) -> bool
pub const fn is_ticket_validation_error(&self) -> bool
Returns true if the enum is HoprProtocolError::TicketValidationError otherwise false
Sourcepub const fn is_core_types_error(&self) -> bool
pub const fn is_core_types_error(&self) -> bool
Returns true if the enum is HoprProtocolError::CoreTypesError otherwise false
Sourcepub const fn is_packet_error(&self) -> bool
pub const fn is_packet_error(&self) -> bool
Returns true if the enum is HoprProtocolError::PacketError otherwise false
Sourcepub const fn is_general_error(&self) -> bool
pub const fn is_general_error(&self) -> bool
Returns true if the enum is HoprProtocolError::GeneralError otherwise false
Sourcepub const fn is_spawn_error(&self) -> bool
pub const fn is_spawn_error(&self) -> bool
Returns true if the enum is HoprProtocolError::SpawnError otherwise false
Trait Implementations§
Source§impl Debug for HoprProtocolError
impl Debug for HoprProtocolError
Source§impl Display for HoprProtocolError
impl Display for HoprProtocolError
Source§impl Error for HoprProtocolError
impl Error for HoprProtocolError
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()
Source§impl From<CoreTypesError> for HoprProtocolError
impl From<CoreTypesError> for HoprProtocolError
Source§impl From<GeneralError> for HoprProtocolError
impl From<GeneralError> for HoprProtocolError
Source§impl From<PacketError> for HoprProtocolError
impl From<PacketError> for HoprProtocolError
Source§fn from(source: PacketError) -> Self
fn from(source: PacketError) -> Self
Source§impl From<SpawnError> for HoprProtocolError
impl From<SpawnError> for HoprProtocolError
Source§impl From<TicketValidationError> for HoprProtocolError
impl From<TicketValidationError> for HoprProtocolError
Source§fn from(source: TicketValidationError) -> Self
fn from(source: TicketValidationError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for HoprProtocolError
impl !UnwindSafe for HoprProtocolError
impl Freeze for HoprProtocolError
impl Send for HoprProtocolError
impl Sync for HoprProtocolError
impl Unpin for HoprProtocolError
impl UnsafeUnpin for HoprProtocolError
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
§impl<T> EitherErrExt for T
impl<T> EitherErrExt for T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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>
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