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
sourceimpl Clone for KeyParseError
impl Clone for KeyParseError
sourcefn clone(&self) -> KeyParseError
fn clone(&self) -> KeyParseError
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for KeyParseError
impl Debug for KeyParseError
sourceimpl Display for KeyParseError
impl Display for KeyParseError
sourceimpl Error for KeyParseError
impl Error for KeyParseError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl PartialEq<KeyParseError> for KeyParseError
impl PartialEq<KeyParseError> for KeyParseError
sourcefn eq(&self, other: &KeyParseError) -> bool
fn eq(&self, other: &KeyParseError) -> bool
impl Eq for KeyParseError
impl StructuralEq for KeyParseError
impl StructuralPartialEq for KeyParseError
Auto Trait Implementations
impl RefUnwindSafe for KeyParseError
impl Send for KeyParseError
impl Sync for KeyParseError
impl Unpin for KeyParseError
impl UnwindSafe for KeyParseError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more