[−]Enum cjdns_bencode::Error
An enumeration of potential errors that appear during serde serialiation and deserialization
Variants
Error that occurs if a map with a key type which does not serialize to a byte string is encountered
Error that occurs if methods on MapSerializer are called out of order
InvalidBool(String)
Error that occurs if a bool is deserialized from an integer value other
than 0
or 1
InvalidF32(usize)
Error that occurs if an f32 is deserialized from an string of length other than 4
InvalidF64(usize)
Error that occurs if an f64 is deserialized from an string of length other than 8
InvalidChar(usize)
Error that occurs if a char is deserialized from a string containing more than one character
Error that occurs if trailing bytes remain after deserialization, if the deserializer is configured to forbid trailing bytes
CustomEncode(String)
Error that occurs if a serde-related error occurs during serialization
CustomDecode(String)
Error that occurs if a serde-related error occurs during deserialization
Encode(Error)
Error that occurs if a problem is encountered during serialization
Error that occurs if a problem is encountered during deserialization
Trait Implementations
impl Debug for Error
impl Display for Error
impl Error for Error
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn description(&self) -> &str
1.0.0[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl Error for Error
impl Error for Error
pub fn custom<T>(msg: T) -> Error where
T: Display,
T: Display,
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
[src]
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
[src]
fn invalid_length(len: usize, exp: &dyn Expected) -> Self
[src]
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
[src]
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
[src]
fn missing_field(field: &'static str) -> Self
[src]
fn duplicate_field(field: &'static str) -> Self
[src]
impl From<Error> for Error
impl From<Error> for Error
impl From<ParseIntError> for Error
pub fn from(parse_int_error: ParseIntError) -> Error
impl From<Utf8Error> for Error
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsFail for T where
T: Fail,
T: Fail,
pub fn as_fail(&self) -> &(dyn Fail + 'static)
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Fail for E where
E: 'static + Error + Send + Sync,
E: 'static + Error + Send + Sync,
fn name(&self) -> Option<&str>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn backtrace(&self) -> Option<&Backtrace>
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
D: Display + Send + Sync + 'static,
fn compat(self) -> Compat<Self>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,