#[non_exhaustive]pub enum KeyFileError {
File(PrivateFileError),
NotOneLine,
InvalidKey(ParseKeyError),
RandomUnavailable,
Encoding,
}Expand description
Why an operator key file could not be created or loaded.
No variant carries any part of the key.
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.
File(PrivateFileError)
The file could not be created, opened or read safely.
NotOneLine
The file is not a single line of UTF-8 text.
InvalidKey(ParseKeyError)
The line is not a valid NIP-19 secret key.
The operating system’s random source failed.
Encoding
The key could not be encoded as nsec.
Trait Implementations§
Source§impl Debug for KeyFileError
impl Debug for KeyFileError
Source§impl Display for KeyFileError
impl Display for KeyFileError
Source§impl Error for KeyFileError
impl Error for KeyFileError
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 KeyFileError
impl !UnwindSafe for KeyFileError
impl Forget for KeyFileError
impl Freeze for KeyFileError
impl Move for KeyFileError
impl Send for KeyFileErrorwhere
Repr: Send,
impl Sync for KeyFileErrorwhere
Repr: Sync,
impl Unpin for KeyFileError
impl UnsafeUnpin for KeyFileError
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