#[non_exhaustive]pub enum CodeSnippetError {
WrongKind(Kind),
MalformedRepo,
InvalidUrl(UrlError),
InvalidCoordinate(CoordinateError),
InvalidRelayUrl(RelayUrlError),
}Expand description
Errors raised while parsing a NIP-C0 event.
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.
WrongKind(Kind)
Event kind is not 1337.
MalformedRepo
repo tag has no value column.
InvalidUrl(UrlError)
Wrapped URL parser error.
InvalidCoordinate(CoordinateError)
Wrapped coordinate parser error.
InvalidRelayUrl(RelayUrlError)
Wrapped relay-URL parser error.
Trait Implementations§
Source§impl Debug for CodeSnippetError
impl Debug for CodeSnippetError
Source§impl Display for CodeSnippetError
impl Display for CodeSnippetError
Source§impl Error for CodeSnippetError
impl Error for CodeSnippetError
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<CoordinateError> for CodeSnippetError
impl From<CoordinateError> for CodeSnippetError
Source§fn from(source: CoordinateError) -> Self
fn from(source: CoordinateError) -> Self
Converts to this type from the input type.
Source§impl From<RelayUrlError> for CodeSnippetError
impl From<RelayUrlError> for CodeSnippetError
Source§fn from(source: RelayUrlError) -> Self
fn from(source: RelayUrlError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CodeSnippetError
impl RefUnwindSafe for CodeSnippetError
impl Send for CodeSnippetError
impl Sync for CodeSnippetError
impl Unpin for CodeSnippetError
impl UnsafeUnpin for CodeSnippetError
impl UnwindSafe for CodeSnippetError
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