pub struct Issues(/* private fields */);Expand description
Every issue a decode found, in the order it found them.
A decode that fails returns at least one issue.
Implementations§
Source§impl Issues
impl Issues
Sourcepub fn flatten(&self) -> IndexMap<String, Vec<String>>
pub fn flatten(&self) -> IndexMap<String, Vec<String>>
The English messages grouped by the JSON Pointer of their path, in the order each path was first seen.
Sourcepub fn flatten_with(
&self,
resolver: &(impl MessageResolver + ?Sized),
) -> IndexMap<String, Vec<String>>
pub fn flatten_with( &self, resolver: &(impl MessageResolver + ?Sized), ) -> IndexMap<String, Vec<String>>
As flatten, with the messages written by resolver.
Sourcepub fn to_json(&self) -> Value
pub fn to_json(&self) -> Value
The issues as a JSON array of {"path", "code", "message", "meta"} objects with English
messages, the form Raoh for Java and PHP give them in. serde_json::to_value(&issues)
gives the same.
Sourcepub fn to_json_with(&self, resolver: &(impl MessageResolver + ?Sized)) -> Value
pub fn to_json_with(&self, resolver: &(impl MessageResolver + ?Sized)) -> Value
As to_json, with the messages written by resolver.
Trait Implementations§
Source§impl Error for Issues
impl Error for Issues
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 Extend<Issue> for Issues
impl Extend<Issue> for Issues
Source§fn extend<T: IntoIterator<Item = Issue>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Issue>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<Issue> for Issues
impl FromIterator<Issue> for Issues
Source§impl IntoIterator for Issues
impl IntoIterator for Issues
Source§impl<'a> IntoIterator for &'a Issues
impl<'a> IntoIterator for &'a Issues
Source§impl Serialize for Issues
Written as Issues::to_json writes them.
impl Serialize for Issues
Written as Issues::to_json writes them.
impl StructuralPartialEq for Issues
Auto Trait Implementations§
impl Freeze for Issues
impl RefUnwindSafe for Issues
impl Send for Issues
impl Sync for Issues
impl Unpin for Issues
impl UnsafeUnpin for Issues
impl UnwindSafe for Issues
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