pub enum DecodeError {
InvalidYAML {
err: ScanError,
},
InvalidJSON {
err: Error,
},
NotAHash,
MissingOutputArgument {
name: String,
},
OutputTypeMismatch {
name: String,
expected: String,
got: String,
},
UnknownClassType {
name: String,
class_name: String,
},
MissingStructProperty {
name: String,
class_name: String,
property_name: String,
},
}
Expand description
Defines errors that can occur during decoding.
Variants§
InvalidYAML
The input was not valid YAML
InvalidJSON
The input was not valid JSON
NotAHash
The input is not a valid Hash, i.e., not a valid object (I think)
MissingOutputArgument
Some returned output argument was missing from what the function reported
OutputTypeMismatch
Some returned output argument has an incorrect type
UnknownClassType
A given output has a given class type defined, but we don’t know about it
MissingStructProperty
Some output struct did not have all its properties defined.
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl Freeze for DecodeError
impl !RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl !UnwindSafe for DecodeError
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request