#[non_exhaustive]pub enum FinishError {
Truncated(TruncatedJson),
Malformed(MalformedJson),
}Expand description
Error returned by JsonSplitter::finish.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Truncated(TruncatedJson)
The stream ended mid-value (inside an object, array, or string).
Malformed(MalformedJson)
A strict-mode framing violation was seen during the stream.
Trait Implementations§
Source§impl Clone for FinishError
impl Clone for FinishError
Source§fn clone(&self) -> FinishError
fn clone(&self) -> FinishError
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 FinishError
impl Debug for FinishError
Source§impl Display for FinishError
impl Display for FinishError
impl Eq for FinishError
Source§impl Error for FinishError
Available on crate feature std only.
impl Error for FinishError
Available on crate feature
std only.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<MalformedJson> for FinishError
impl From<MalformedJson> for FinishError
Source§fn from(e: MalformedJson) -> Self
fn from(e: MalformedJson) -> Self
Converts to this type from the input type.
Source§impl From<TruncatedJson> for FinishError
impl From<TruncatedJson> for FinishError
Source§fn from(e: TruncatedJson) -> Self
fn from(e: TruncatedJson) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FinishError
impl PartialEq for FinishError
Source§fn eq(&self, other: &FinishError) -> bool
fn eq(&self, other: &FinishError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FinishError
Auto Trait Implementations§
impl Freeze for FinishError
impl RefUnwindSafe for FinishError
impl Send for FinishError
impl Sync for FinishError
impl Unpin for FinishError
impl UnsafeUnpin for FinishError
impl UnwindSafe for FinishError
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