#[non_exhaustive]pub enum RepostError {
NotATextNote(u16),
Serialize(Box<Error>),
}Expand description
Errors raised by the NIP-18 builders.
Serialize boxes its serde_json::Error payload so the enum
stays small in the common-success path: the underlying error is
14 bytes whereas every other variant fits in two.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotATextNote(u16)
EventBuilder::repost was called with an event whose kind is
not Kind::TEXT_NOTE. NIP-18 reserves kind: 6 for kind: 1
reposts; use EventBuilder::generic_repost for everything
else.
Serialize(Box<Error>)
Serialising the reposted event into the repost’s content
field failed.
Trait Implementations§
Source§impl Debug for RepostError
impl Debug for RepostError
Source§impl Display for RepostError
impl Display for RepostError
Source§impl Error for RepostError
impl Error for RepostError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for RepostError
impl !UnwindSafe for RepostError
impl Freeze for RepostError
impl Send for RepostError
impl Sync for RepostError
impl Unpin for RepostError
impl UnsafeUnpin for RepostError
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