pub enum AttestationError {
Malformed,
InvalidSignature,
WrongKind,
WrongDocument,
MissingTag(&'static str),
RepeatedTag(&'static str),
InvalidTag(&'static str),
NotYetValid,
Expired,
LifetimeTooLong,
InvalidInput(&'static str),
}Expand description
Why an attestation or a rebind authorisation was refused.
Variants§
Malformed
The text is not a Nostr event.
InvalidSignature
The event id does not match its content, or the signature is invalid.
WrongKind
The event is not of kind 38388.
WrongDocument
The z tag is missing or names another document.
MissingTag(&'static str)
A required tag is absent.
RepeatedTag(&'static str)
A tag that must appear once appears more than once.
InvalidTag(&'static str)
A tag value breaks its format or range.
NotYetValid
created_at is later than the clock allows.
Expired
expiration has passed.
LifetimeTooLong
expiration - created_at exceeds the allowed lifetime.
InvalidInput(&'static str)
An argument passed to a builder would produce an event that does not parse.
Implementations§
Source§impl AttestationError
impl AttestationError
Sourcepub fn cant_do_reason(&self) -> CantDoReason
pub fn cant_do_reason(&self) -> CantDoReason
The cant-do reason a destination answers an attestation refused
with this error: expired_reputation_attestation when it expired,
invalid_reputation_attestation otherwise. A refused rebind
authorisation is always CantDoReason::InvalidReputationRebind.
Trait Implementations§
Source§impl Clone for AttestationError
impl Clone for AttestationError
Source§impl Debug for AttestationError
impl Debug for AttestationError
Source§impl Display for AttestationError
impl Display for AttestationError
impl Eq for AttestationError
Source§impl Error for AttestationError
impl Error for AttestationError
1.30.0 · 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 PartialEq for AttestationError
impl PartialEq for AttestationError
impl StructuralPartialEq for AttestationError
Auto Trait Implementations§
impl Freeze for AttestationError
impl RefUnwindSafe for AttestationError
impl Send for AttestationError
impl Sync for AttestationError
impl Unpin for AttestationError
impl UnsafeUnpin for AttestationError
impl UnwindSafe for AttestationError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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