pub struct EncodeError {
pub path: Place,
pub problem: String,
pub kind: EncodeErrorKind,
}Expand description
Why a value could not be encoded at a type, or a type has no schema.
A checked program never meets one: it is a value that does not have the type it is encoded at, or a type with no encoding, such as a function’s.
Fields§
§path: PlaceThe place in the value, as in DecodeError::path.
problem: StringWhat was wrong there, for a person.
kind: EncodeErrorKindWhich refusal it is.
Trait Implementations§
Source§impl Clone for EncodeError
impl Clone for EncodeError
Source§impl Debug for EncodeError
impl Debug for EncodeError
Source§impl Display for EncodeError
impl Display for EncodeError
impl Eq for EncodeError
Source§impl Error for EncodeError
impl Error for EncodeError
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()
Source§impl From<DecodeError> for EncodeError
A description that does not read back is one that does not validate.
impl From<DecodeError> for EncodeError
A description that does not read back is one that does not validate.
Source§fn from(error: DecodeError) -> Self
fn from(error: DecodeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EncodeError
impl PartialEq for EncodeError
impl StructuralPartialEq for EncodeError
Auto Trait Implementations§
impl Forget for EncodeError
impl Freeze for EncodeError
impl Move for EncodeError
impl RefUnwindSafe for EncodeError
impl Send for EncodeErrorwhere
RawVecInner: Send,
impl Sync for EncodeErrorwhere
RawVecInner: Sync,
impl Unpin for EncodeError
impl UnsafeUnpin for EncodeErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Step>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for EncodeErrorwhere
RawVecInner: UnwindSafe,
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