Enum bip_bencode::BencodeConvertErrorKind
[−]
pub enum BencodeConvertErrorKind {
Msg(String),
MissingKey {
key: Vec<u8>,
},
WrongType {
key: Vec<u8>,
expected_type: String,
},
// some variants omitted
}The kind of an error.
Variants
Msg(String)A convenient variant for String.
MissingKeyFields of MissingKey
key: Vec<u8> |
WrongTypeFields of WrongType
key: Vec<u8> | |
expected_type: String |
Methods
impl BencodeConvertErrorKind
fn description(&self) -> &str
A string describing the error kind.
Trait Implementations
impl Debug for BencodeConvertErrorKind
impl Display for BencodeConvertErrorKind
impl<'a> From<&'a str> for BencodeConvertErrorKind
impl From<String> for BencodeConvertErrorKind
impl From<BencodeConvertError> for BencodeConvertErrorKind
fn from(e: BencodeConvertError) -> Self
Performs the conversion.