Enum libp2p_pnet::KeyParseError
source · pub enum KeyParseError {
InvalidKeyFile,
InvalidKeyType,
InvalidKeyEncoding,
InvalidKeyLength,
InvalidKeyChar(ParseIntError),
}
Expand description
Error when parsing a PreSharedKey
Variants§
InvalidKeyFile
file does not have the expected structure
InvalidKeyType
unsupported key type
InvalidKeyEncoding
unsupported key encoding. Currently only base16 is supported
InvalidKeyLength
Key is of the wrong length
InvalidKeyChar(ParseIntError)
key string contains a char that is not consistent with the specified encoding
Trait Implementations§
source§impl Clone for KeyParseError
impl Clone for KeyParseError
source§fn clone(&self) -> KeyParseError
fn clone(&self) -> KeyParseError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for KeyParseError
impl Debug for KeyParseError
source§impl Display for KeyParseError
impl Display for KeyParseError
source§impl Error for KeyParseError
impl Error for KeyParseError
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 PartialEq for KeyParseError
impl PartialEq for KeyParseError
impl Eq for KeyParseError
impl StructuralPartialEq for KeyParseError
Auto Trait Implementations§
impl Freeze for KeyParseError
impl RefUnwindSafe for KeyParseError
impl Send for KeyParseError
impl Sync for KeyParseError
impl Unpin for KeyParseError
impl UnwindSafe for KeyParseError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)