Enum libp2p::pnet::KeyParseError
source · pub enum KeyParseError {
InvalidKeyFile,
InvalidKeyType,
InvalidKeyEncoding,
InvalidKeyLength,
InvalidKeyChar(ParseIntError),
}
Available on crate feature
pnet
only.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)>
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()