Enum ParseOrSemanticError
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§
§impl Clone for ParseOrSemanticError
impl Clone for ParseOrSemanticError
§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 more§impl Debug for ParseOrSemanticError
impl Debug for ParseOrSemanticError
§impl Display for ParseOrSemanticError
impl Display for ParseOrSemanticError
§impl Error for ParseOrSemanticError
impl Error for ParseOrSemanticError
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 From<Bolt11ParseError> for ParseOrSemanticError
impl From<Bolt11ParseError> for ParseOrSemanticError
§fn from(e: Bolt11ParseError) -> ParseOrSemanticError
fn from(e: Bolt11ParseError) -> ParseOrSemanticError
Converts to this type from the input type.
§impl From<Bolt11SemanticError> for ParseOrSemanticError
impl From<Bolt11SemanticError> for ParseOrSemanticError
§fn from(e: Bolt11SemanticError) -> ParseOrSemanticError
fn from(e: Bolt11SemanticError) -> ParseOrSemanticError
Converts to this type from the input type.
§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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request