pub enum ParseOrSemanticError {
ParseError(ParseError),
SemanticError(SemanticError),
}
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(ParseError)
The invoice couldn’t be decoded
SemanticError(SemanticError)
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)>
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<ParseError> for ParseOrSemanticError
impl From<ParseError> for ParseOrSemanticError
source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
source§impl From<SemanticError> for ParseOrSemanticError
impl From<SemanticError> for ParseOrSemanticError
source§fn from(e: SemanticError) -> Self
fn from(e: SemanticError) -> Self
Converts to this type from the input type.