#[non_exhaustive]pub enum ChannelMetadataError {
InvalidJson(Error),
NotAnObject,
InvalidStringField {
key: &'static str,
actual: String,
},
InvalidRelaysField,
InvalidRelayUrl(RelayUrlError),
}Expand description
Errors raised while parsing channel metadata JSON or hide-reason JSON.
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.
InvalidJson(Error)
The .content was not parseable JSON.
NotAnObject
The JSON was a valid value but not an object.
InvalidStringField
A spec-named string field was something other than a string.
Fields
InvalidRelaysField
relays was not an array of strings.
InvalidRelayUrl(RelayUrlError)
One of the relays[i] strings failed RelayUrl::parse.
Trait Implementations§
Source§impl Debug for ChannelMetadataError
impl Debug for ChannelMetadataError
Source§impl Display for ChannelMetadataError
impl Display for ChannelMetadataError
Source§impl Error for ChannelMetadataError
impl Error for ChannelMetadataError
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 ChannelMetadataError
impl !UnwindSafe for ChannelMetadataError
impl Freeze for ChannelMetadataError
impl Send for ChannelMetadataError
impl Sync for ChannelMetadataError
impl Unpin for ChannelMetadataError
impl UnsafeUnpin for ChannelMetadataError
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