pub enum ProtoConvertError {
MissingField(&'static str),
UnknownExcType(String),
UnknownType(String),
UnknownBuiltinFunction(String),
InvalidFileMode(String),
InvalidTimeCaller(String),
InvalidValue {
field: &'static str,
reason: String,
},
}Expand description
Why a wire value could not be converted into its monty equivalent.
Returned by all TryFrom<pb::...> impls in this crate. The variants are
deliberately specific so a parent can log exactly which field a misbehaving
child produced.
Variants§
MissingField(&'static str)
A required message field or oneof was absent.
UnknownExcType(String)
An exception type name that monty does not know.
UnknownType(String)
A type name that monty’s MontyType::from_type_name does not know.
UnknownBuiltinFunction(String)
A builtin function name that monty does not know.
InvalidFileMode(String)
A file handle mode string that is not a supported open() mode.
InvalidTimeCaller(String)
A time.time caller name that no TimeCaller spells.
InvalidValue
A field value was out of range or otherwise malformed.
Trait Implementations§
Source§impl Debug for ProtoConvertError
impl Debug for ProtoConvertError
Source§impl Display for ProtoConvertError
impl Display for ProtoConvertError
Source§impl Error for ProtoConvertError
impl Error for ProtoConvertError
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 ProtoConvertError
impl RefUnwindSafe for ProtoConvertError
impl Send for ProtoConvertError
impl Sync for ProtoConvertError
impl Unpin for ProtoConvertError
impl UnsafeUnpin for ProtoConvertError
impl UnwindSafe for ProtoConvertError
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