#[non_exhaustive]pub enum VoiceMessageError {
WrongKind(Kind),
InvalidAudioUrl(UrlError),
InvalidMediaAttachment(MediaAttachmentError),
InvalidDuration(String),
}Expand description
Errors raised while parsing a NIP-A0 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 1222 / 1244.
InvalidAudioUrl(UrlError)
.content is not a parseable URL.
InvalidMediaAttachment(MediaAttachmentError)
Wrapped imeta parser error.
InvalidDuration(String)
Voice preview duration could not be parsed as an integer.
Trait Implementations§
Source§impl Debug for VoiceMessageError
impl Debug for VoiceMessageError
Source§impl Display for VoiceMessageError
impl Display for VoiceMessageError
Source§impl Error for VoiceMessageError
impl Error for VoiceMessageError
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<MediaAttachmentError> for VoiceMessageError
impl From<MediaAttachmentError> for VoiceMessageError
Source§fn from(source: MediaAttachmentError) -> Self
fn from(source: MediaAttachmentError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for VoiceMessageError
impl RefUnwindSafe for VoiceMessageError
impl Send for VoiceMessageError
impl Sync for VoiceMessageError
impl Unpin for VoiceMessageError
impl UnsafeUnpin for VoiceMessageError
impl UnwindSafe for VoiceMessageError
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