pub enum ParseOrSemanticError {
ParseError(Bolt11ParseError),
SemanticError(Bolt11SemanticError),
}
Expand description
Indicates that something went wrong while parsing or validating the invoice. Parsing errors should be mostly seen as opaque and are only there for debugging reasons. Semantic errors like wrong signatures, missing fields etc. could mean that someone tampered with the invoice.
Variants§
ParseError(Bolt11ParseError)
The invoice couldn’t be decoded
SemanticError(Bolt11SemanticError)
The invoice could be decoded but violates the BOLT11 standard
Trait Implementations§
source§impl Clone for ParseOrSemanticError
impl Clone for ParseOrSemanticError
source§fn clone(&self) -> ParseOrSemanticError
fn clone(&self) -> ParseOrSemanticError
Returns a copy 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 ParseOrSemanticError
impl Debug for ParseOrSemanticError
source§impl Display for ParseOrSemanticError
impl Display for ParseOrSemanticError
source§impl Error for ParseOrSemanticError
Available on crate feature std
only.
impl Error for ParseOrSemanticError
Available on crate feature
std
only.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()
source§impl From<Bolt11ParseError> for ParseOrSemanticError
impl From<Bolt11ParseError> for ParseOrSemanticError
source§fn from(e: Bolt11ParseError) -> Self
fn from(e: Bolt11ParseError) -> Self
Converts to this type from the input type.
source§impl From<Bolt11SemanticError> for ParseOrSemanticError
impl From<Bolt11SemanticError> for ParseOrSemanticError
source§fn from(e: Bolt11SemanticError) -> Self
fn from(e: Bolt11SemanticError) -> Self
Converts to this type from the input type.
source§impl PartialEq for ParseOrSemanticError
impl PartialEq for ParseOrSemanticError
impl Eq for ParseOrSemanticError
impl StructuralPartialEq for ParseOrSemanticError
Auto Trait Implementations§
impl Freeze for ParseOrSemanticError
impl RefUnwindSafe for ParseOrSemanticError
impl Send for ParseOrSemanticError
impl Sync for ParseOrSemanticError
impl Unpin for ParseOrSemanticError
impl UnwindSafe for ParseOrSemanticError
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)