pub enum FromWireError {
UnsupportedKind {
kind: String,
},
MalformedField {
field: &'static str,
detail: String,
},
DeserialisationFailed(String),
}Expand description
Errors the reverse codec can surface when converting a WireNode back
to a lex-core crate::lex::ast::ContentItem.
Forward conversion (to_wire_*) is total — every lex-core AST shape
has a defined mapping to a wire form. Reverse conversion is fallible
because the wire input may be malformed or carry an unknown variant.
Variants§
UnsupportedKind
The wire node carried an unknown structural placeholder (an
Unknown variant added in a future wire version, or a kind the
host’s WIRE_VERSION does not recognise).
MalformedField
A required field was missing or had the wrong shape — for
example, a WireNode::Annotation whose params was not a
JSON object.
DeserialisationFailed(String)
A nested serde_json::from_value conversion failed when
destructuring an opaque field (e.g., params blob).
Trait Implementations§
Source§impl Clone for FromWireError
impl Clone for FromWireError
Source§fn clone(&self) -> FromWireError
fn clone(&self) -> FromWireError
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 FromWireError
impl Debug for FromWireError
Source§impl Display for FromWireError
impl Display for FromWireError
Source§impl Error for FromWireError
impl Error for FromWireError
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 PartialEq for FromWireError
impl PartialEq for FromWireError
Source§fn eq(&self, other: &FromWireError) -> bool
fn eq(&self, other: &FromWireError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FromWireError
Auto Trait Implementations§
impl Freeze for FromWireError
impl RefUnwindSafe for FromWireError
impl Send for FromWireError
impl Sync for FromWireError
impl Unpin for FromWireError
impl UnsafeUnpin for FromWireError
impl UnwindSafe for FromWireError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more