#[non_exhaustive]pub enum Error {
Show 14 variants
Message(String),
InputOutput(Arc<Error>),
IncorrectType,
Utf8(Utf8Error),
PaddingNot0(u8),
UnknownFd,
MissingFramingOffset,
IncompatibleFormat(Signature, Format),
SignatureMismatch(Signature, String),
OutOfBounds,
MaxDepthExceeded(MaxDepthExceeded),
SignatureParse(Error),
EmptyStructure,
InvalidObjectPath,
}
Expand description
Error type used by zvariant API.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Message(String)
Generic error. All serde errors gets transformed into this variant.
InputOutput(Arc<Error>)
Wrapper for std::io::Error
IncorrectType
Type conversions errors.
Utf8(Utf8Error)
Wrapper for std::str::Utf8Error
PaddingNot0(u8)
Non-0 padding byte(s) encountered.
UnknownFd
The deserialized file descriptor is not in the given FD index.
MissingFramingOffset
Missing framing offset at the end of a GVariant-encoded container,
IncompatibleFormat(Signature, Format)
The type (signature as first argument) being (de)serialized is not supported by the format.
SignatureMismatch(Signature, String)
The provided signature (first argument) was not valid for reading as the requested type. Details on the expected signatures are in the second argument.
OutOfBounds
Out of bounds range specified.
MaxDepthExceeded(MaxDepthExceeded)
The maximum allowed depth for containers in encoding was exceeded.
SignatureParse(Error)
Error from parsing a signature.
EmptyStructure
Attempted to create an empty structure (which is not allowed by the D-Bus specification).
InvalidObjectPath
Invalid object path.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl Error for Error
impl Error for Error
Source§fn custom<T>(msg: T) -> Errorwhere
T: Display,
fn custom<T>(msg: T) -> Errorwhere
T: Display,
Source§fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Deserialize
receives a type different from what it was
expecting. Read moreSource§fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Deserialize
receives a value of the right type but that
is wrong for some other reason. Read moreSource§fn invalid_length(len: usize, exp: &dyn Expected) -> Self
fn invalid_length(len: usize, exp: &dyn Expected) -> Self
Source§fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
Deserialize
enum type received a variant with an
unrecognized name.Source§fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
Deserialize
struct type received a field with an
unrecognized name.Source§fn missing_field(field: &'static str) -> Self
fn missing_field(field: &'static str) -> Self
Deserialize
struct type expected to receive a required
field with a particular name but that field was not present in the
input.Source§fn duplicate_field(field: &'static str) -> Self
fn duplicate_field(field: &'static str) -> Self
Deserialize
struct type received more than one of the
same field.Source§impl From<Infallible> for Error
impl From<Infallible> for Error
Source§fn from(i: Infallible) -> Self
fn from(i: Infallible) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)