pub enum MarshalError {
ArgCount {
expected: usize,
got: usize,
},
Body(String),
}Expand description
Typed error returned at the marshal boundary.
Replaces panics from the deleted into_value_word() boundary. The
dispatcher converts MarshalError into a Result<TypedReturn, String>
at the registry edge so legacy String-error paths keep working
during the migration.
Variants§
ArgCount
Arg count mismatch between the function’s registered arity and the slot slice handed in by the dispatcher.
Body(String)
The body returned an Err(String) — surfaced verbatim.
Trait Implementations§
Source§impl Clone for MarshalError
impl Clone for MarshalError
Source§fn clone(&self) -> MarshalError
fn clone(&self) -> MarshalError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarshalError
impl Debug for MarshalError
Source§impl Display for MarshalError
impl Display for MarshalError
Source§impl Error for MarshalError
impl Error for MarshalError
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<MarshalError> for String
impl From<MarshalError> for String
Source§fn from(e: MarshalError) -> Self
fn from(e: MarshalError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MarshalError
impl PartialEq for MarshalError
Source§fn eq(&self, other: &MarshalError) -> bool
fn eq(&self, other: &MarshalError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MarshalError
Auto Trait Implementations§
impl Freeze for MarshalError
impl RefUnwindSafe for MarshalError
impl Send for MarshalError
impl Sync for MarshalError
impl Unpin for MarshalError
impl UnsafeUnpin for MarshalError
impl UnwindSafe for MarshalError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.