Debian Codegraph @

src/error.rs

raw symbols SCIP
1 //! # Error Handling
2 //!
3 //! ## Masking Sensitive Data
4 //!
5 //! When working with sensitive data, you might want to hide actual values from error messages.
6 //! The `ValidationError` type provides methods to mask instance values while preserving the error context:
7 //!
8 //! ```rust
9 //! # fn main() -> Result<(), Box<dyn std::error::Error>> {
10 //! use serde_json::json;
11 //!
12 //! let schema = json!({"maxLength": 5});
13 //! let instance = json!("sensitive data");
14 //! let validator = jsonschema::validator_for(&schema)?;
15 //!
16 //! if let Err(error) = validator.validate(&instance) {
17 //! // Use default masking (replaces values with "value")
18 //! println!("Masked error: {}", error.masked());
19 //! // Or provide custom placeholder
20 //! println!("Custom masked: {}", error.masked_with("[REDACTED]"));
21 //! }
22 //! # Ok(())
23 //! # }
24 //! ```
25 //!
26 //! The masked error messages will replace instance values with placeholders while maintaining
27 //! schema-related information like property names, limits, and types.
28 //!
29 //! Original error:
30 //! ```text
31 //! "sensitive data" is longer than 5 characters
32 //! ```
33 //!
34 //! Masked error:
35 //! ```text
36 //! value is longer than 5 characters
37 //! ```
38 use craterust-analyzer cargo jsonschema 0.37.4 crate/::{
39 pathsrust-analyzer cargo jsonschema 0.37.4 paths/::Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
40 threadrust-analyzer cargo jsonschema 0.37.4 thread/::ThreadBoundrust-analyzer cargo jsonschema 0.37.4 thread/ThreadBound#,
41 typesrust-analyzer cargo jsonschema 0.37.4 types/::{JsonTyperust-analyzer cargo jsonschema 0.37.4 types/JsonType#, JsonTypeSetrust-analyzer cargo jsonschema 0.37.4 types/JsonTypeSet#},
42 };
43 use serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::{Maprust-analyzer cargo serde_json 1.0.145 map/Map#, Numberrust-analyzer cargo serde_json 1.0.145 number/Number#, Valuerust-analyzer cargo serde_json 1.0.145 value/Value#};
44 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{
45 borrowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/::Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#,
46 errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/,
47 fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::{selfrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/, Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#, Writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Write#},
48 iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::{emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/empty/empty()., oncerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/once/once().},
49 slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/,
50 stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/::FromUtf8Errorrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/FromUtf8Error#,
51 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/,
52 };
53
54 /// An error that can occur during validation.
55 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
56 pub struct ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
57 reprrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#repr.: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<ValidationErrorReprrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#<'a>>,
58 }
59
60 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
61 struct ValidationErrorReprrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#<'a> {
62 instancerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#instance.: Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'a, Valuerust-analyzer cargo serde_json 1.0.145 value/Value#>,
63 kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#kind.: ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#,
64 instance_pathrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#instance_path.: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
65 schema_pathrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#schema_path.: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
66 }
67
68 /// An iterator over instances of [`ValidationError`] that represent validation error for the
69 /// input instance.
70 ///
71 /// # Examples
72 ///
73 /// ```rust
74 /// use serde_json::json;
75 ///
76 /// let schema = json!({"maxLength": 5});
77 /// let instance = json!("foo");
78 /// if let Ok(validator) = jsonschema::validator_for(&schema) {
79 /// let errors = validator.iter_errors(&instance);
80 /// for error in errors {
81 /// println!("Validation error: {}", error)
82 /// }
83 /// }
84 /// ```
85 #[doc(hidden)]
86 pub trait ValidationErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorIterator#<'a>: Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>> + ThreadBoundrust-analyzer cargo jsonschema 0.37.4 thread/ThreadBound# {}
87
88 impl<'a, T> ValidationErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorIterator#<'a> for T where
89 T: Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>> + ThreadBoundrust-analyzer cargo jsonschema 0.37.4 thread/ThreadBound#
90 {
91 }
92
93 /// A lazily-evaluated iterator over validation errors.
94 ///
95 /// Use [`into_errors()`](Self::into_errors) to convert into [`ValidationErrors`],
96 /// which implements [`std::error::Error`] for integration with error handling libraries.
97 pub struct ErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#<'a> {
98 iterrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#iter.: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn ValidationErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorIterator#<'a> + 'a>,
99 }
100
101 impl<'a> ErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#<'a> {
102 #[inline]
103 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn from_iteratorrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`]from_iterator().<T>(iterator: T) -> Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`]
104 where
105 T: ValidationErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorIterator#<'a> + 'a,
106 {
107 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`] {
108 iterrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#iter.: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(iterator),
109 }
110 }
111
112 /// Collects all errors into [`ValidationErrors`], which implements [`std::error::Error`].
113 #[inline]
114 #[must_use]
115 pub fn into_errorsrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`]into_errors().(self) -> ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#<'a> {
116 ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors# {
117 errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: self.collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().(),
118 }
119 }
120 }
121
122 /// An owned collection of validation errors that implements [`std::error::Error`].
123 ///
124 /// Obtain this by calling [`ErrorIterator::into_errors()`].
125 pub struct ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#<'a> {
126 errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>>,
127 }
128
129 impl<'a> ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#<'a> {
130 #[inline]
131 #[must_use]
132 pub fn lenrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]len().(&self) -> usize {
133 self.errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().()
134 }
135
136 #[inline]
137 #[must_use]
138 pub fn is_emptyrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]is_empty().(&self) -> bool {
139 self.errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors..is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]is_empty().()
140 }
141
142 /// Returns the errors as a slice.
143 #[inline]
144 #[must_use]
145 pub fn as_slicerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]as_slice().(&self) -> &[ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>] {
146 &self.errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.
147 }
148
149 #[inline]
150 pub fn iterrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]iter().(&self) -> slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/::Iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/Iter#<'_, ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>> {
151 self.errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
152 }
153
154 #[inline]
155 pub fn iter_mutrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]iter_mut().(&mut self) -> slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/::IterMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/IterMut#<'_, ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>> {
156 self.errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors..iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().()
157 }
158 }
159
160 impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#<'_> {
161 fn fmtrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'_>`][Display]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
162 if self.errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors..is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]is_empty().() {
163 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("Validation succeeded")
164 } else {
165 writelnrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/writeln!!(f, "Validation errors:")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
166 for (idx, error) in self.errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() {
167 writelnrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/writeln!!(f, "{:02}: {error}", idx +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). 1)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
168 }
169 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
170 }
171 }
172 }
173
174 impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug# for ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#<'_> {
175 fn fmtrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'_>`][Debug]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
176 f.debug_structrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]debug_struct().("ValidationErrors")
177 .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("errors", &self.errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.)
178 .finishrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]finish().()
179 }
180 }
181
182 impl errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# for ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#<'_> {}
183
184 impl<'a> Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator# for ErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#<'a> {
185 type Itemrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]Item# = ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>;
186
187 #[inline]
188 fn nextrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]next().(&mut self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]::Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item#> {
189 self.iterrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#iter..as_mutrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][`AsMut<T>`]as_mut().().nextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#next().()
190 }
191
192 #[inline]
193 fn size_hintrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]size_hint().(&self) -> (usize, Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<usize>) {
194 self.iterrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#iter..size_hintrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/iter/impl#[`Box<I, A>`][Iterator]size_hint().()
195 }
196 }
197
198 impl<'a> IntoIteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator# for ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#<'a> {
199 type Itemrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`][IntoIterator]Item# = ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>;
200 type IntoIterrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`][IntoIterator]IntoIter# = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/::IntoIterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/into_iter/IntoIter#<ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>>;
201
202 fn into_iterrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`][IntoIterator]into_iter().(self) -> Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`][IntoIterator]::IntoIterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#IntoIter# {
203 self.errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors..into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().()
204 }
205 }
206
207 impl<'a, 'b> IntoIteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator# for &'b ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#<'a> {
208 type Itemrust-analyzer cargo jsonschema 0.37.4 error/impl#[`&'b ValidationErrors<'a>`][IntoIterator]Item# = &'b ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>;
209 type IntoIterrust-analyzer cargo jsonschema 0.37.4 error/impl#[`&'b ValidationErrors<'a>`][IntoIterator]IntoIter# = slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/::Iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/Iter#<'b, ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>>;
210
211 fn into_iterrust-analyzer cargo jsonschema 0.37.4 error/impl#[`&'b ValidationErrors<'a>`][IntoIterator]into_iter().(self) -> Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`&'b ValidationErrors<'a>`][IntoIterator]::IntoIterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#IntoIter# {
212 self.errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()
213 }
214 }
215
216 impl<'a, 'b> IntoIteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator# for &'b mut ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#<'a> {
217 type Itemrust-analyzer cargo jsonschema 0.37.4 error/impl#[`&'b mut ValidationErrors<'a>`][IntoIterator]Item# = &'b mut ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>;
218 type IntoIterrust-analyzer cargo jsonschema 0.37.4 error/impl#[`&'b mut ValidationErrors<'a>`][IntoIterator]IntoIter# = slicerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/::IterMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/IterMut#<'b, ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>>;
219
220 fn into_iterrust-analyzer cargo jsonschema 0.37.4 error/impl#[`&'b mut ValidationErrors<'a>`][IntoIterator]into_iter().(self) -> Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`&'b mut ValidationErrors<'a>`][IntoIterator]::IntoIterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#IntoIter# {
221 self.errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors..iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().()
222 }
223 }
224
225 // Empty iterator means no error happened
226 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn no_errorrust-analyzer cargo jsonschema 0.37.4 error/no_error().<'a>() -> ErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#<'a> {
227 ErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#::from_iteratorrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`]from_iterator().(emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/empty/empty().())
228 }
229 // A wrapper for one error
230 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn errorrust-analyzer cargo jsonschema 0.37.4 error/error().(instance: ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#) -> ErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator# {
231 ErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#::from_iteratorrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`]from_iterator().(oncerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/once/once().(instance))
232 }
233
234 /// Kinds of errors that may happen during validation
235 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
236 #[allow(missing_docs)]
237 pub enum ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind# {
238 /// The input array contain more items than expected.
239 AdditionalItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalItems#limit.: usize },
240 /// Unexpected properties.
241 AdditionalPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalProperties# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalProperties#unexpected.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> },
242 /// The input value is not valid under any of the schemas listed in the 'anyOf' keyword.
243 AnyOfrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AnyOf# {
244 contextrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AnyOf#context.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'static>>>,
245 },
246 /// Results from a [`fancy_regex::RuntimeError::BacktrackLimitExceeded`] variant when matching
247 BacktrackLimitExceededrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#BacktrackLimitExceeded# { errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#BacktrackLimitExceeded#error.: fancy_regexrust-analyzer cargo fancy-regex 0.11.0 crate/::Errorrust-analyzer cargo fancy-regex 0.11.0 error/Error# },
248 /// The input value doesn't match expected constant.
249 Constantrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant# { expected_valuerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant#expected_value.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value# },
250 /// The input array doesn't contain items conforming to the specified schema.
251 Containsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Contains#,
252 /// The input value does not respect the defined contentEncoding
253 ContentEncodingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentEncoding# { content_encodingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentEncoding#content_encoding.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# },
254 /// The input value does not respect the defined contentMediaType
255 ContentMediaTyperust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentMediaType# { content_media_typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentMediaType#content_media_type.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# },
256 /// Custom error message for user-defined validation.
257 Customrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Custom# { messagerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Custom#message.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# },
258 /// The input value doesn't match any of specified options.
259 Enumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Enum# { optionsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Enum#options.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value# },
260 /// Value is too large.
261 ExclusiveMaximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMaximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMaximum#limit.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value# },
262 /// Value is too small.
263 ExclusiveMinimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMinimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMinimum#limit.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value# },
264 /// Everything is invalid for `false` schema.
265 FalseSchemarust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FalseSchema#,
266 /// When the input doesn't match to the specified format.
267 Formatrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Format# { formatrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Format#format.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# },
268 /// May happen in `contentEncoding` validation if `base64` encoded data is invalid.
269 FromUtf8rust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FromUtf8# { errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FromUtf8#error.: FromUtf8Errorrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/FromUtf8Error# },
270 /// Too many items in an array.
271 MaxItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxItems#limit.: u64 },
272 /// Value is too large.
273 Maximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum#limit.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value# },
274 /// String is too long.
275 MaxLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength#limit.: u64 },
276 /// Too many properties in an object.
277 MaxPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxProperties# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxProperties#limit.: u64 },
278 /// Too few items in an array.
279 MinItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinItems#limit.: u64 },
280 /// Value is too small.
281 Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value# },
282 /// String is too short.
283 MinLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinLength# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinLength#limit.: u64 },
284 /// Not enough properties in an object.
285 MinPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinProperties# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinProperties#limit.: u64 },
286 /// When some number is not a multiple of another number.
287 MultipleOfrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MultipleOf# {
288 #[cfg(feature = "arbitrary-precision")]
289 multiple_ofrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MultipleOf#multiple_of.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
290 #[cfg(not(feature = "arbitrary-precision"))]
291 multiple_of: f64,
292 },
293 /// Negated schema failed validation.
294 Notrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Not# { schemarust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Not#schema.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value# },
295 /// The given schema is valid under more than one of the schemas listed in the 'oneOf' keyword.
296 OneOfMultipleValidrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfMultipleValid# {
297 contextrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfMultipleValid#context.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'static>>>,
298 },
299 /// The given schema is not valid under any of the schemas listed in the 'oneOf' keyword.
300 OneOfNotValidrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfNotValid# {
301 contextrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfNotValid#context.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'static>>>,
302 },
303 /// When the input doesn't match to a pattern.
304 Patternrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Pattern# { patternrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Pattern#pattern.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# },
305 /// Object property names are invalid.
306 PropertyNamesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#PropertyNames# {
307 errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#PropertyNames#error.: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'static>>,
308 },
309 /// When a required property is missing.
310 Requiredrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Required# { propertyrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Required#property.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value# },
311 /// When the input value doesn't match one or multiple required types.
312 Typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type# { kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type#kind.: TypeKindrust-analyzer cargo jsonschema 0.37.4 error/TypeKind# },
313 /// Unexpected items.
314 UnevaluatedItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedItems# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedItems#unexpected.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> },
315 /// Unexpected properties.
316 UnevaluatedPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedProperties# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedProperties#unexpected.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> },
317 /// When the input array has non-unique elements.
318 UniqueItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UniqueItems#,
319 /// Error during schema ref resolution.
320 Referencingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Referencing#(referencingrust-analyzer cargo referencing 0.37.4 crate/::Errorrust-analyzer cargo referencing 0.37.4 error/Error#),
321 }
322
323 impl ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind# {
324 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn keywordrust-analyzer cargo jsonschema 0.37.4 error/impl#[ValidationErrorKind]keyword().(&self) -> &'static str {
325 match self {
326 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AdditionalItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalItems# { .. } => "additionalItems",
327 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AdditionalPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalProperties# { .. } => "additionalProperties",
328 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AnyOfrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AnyOf# { .. } => "anyOf",
329 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::BacktrackLimitExceededrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#BacktrackLimitExceeded# { .. }
330 | ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Patternrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Pattern# { .. } => "pattern",
331 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Constantrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant# { .. } => "const",
332 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Containsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Contains# => "contains",
333 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ContentEncodingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentEncoding# { .. } | ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::FromUtf8rust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FromUtf8# { .. } => {
334 "contentEncoding"
335 }
336 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ContentMediaTyperust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentMediaType# { .. } => "contentMediaType",
337 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Customrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Custom# { .. } => "custom",
338 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Enumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Enum# { .. } => "enum",
339 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ExclusiveMaximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMaximum# { .. } => "exclusiveMaximum",
340 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ExclusiveMinimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMinimum# { .. } => "exclusiveMinimum",
341 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::FalseSchemarust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FalseSchema# => "falseSchema",
342 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Formatrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Format# { .. } => "format",
343 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxItems# { .. } => "maxItems",
344 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Maximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum# { .. } => "maximum",
345 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength# { .. } => "maxLength",
346 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxProperties# { .. } => "maxProperties",
347 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinItems# { .. } => "minItems",
348 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { .. } => "minimum",
349 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinLength# { .. } => "minLength",
350 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinProperties# { .. } => "minProperties",
351 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MultipleOfrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MultipleOf# { .. } => "multipleOf",
352 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Notrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Not# { .. } => "not",
353 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::OneOfMultipleValidrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfMultipleValid# { .. }
354 | ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::OneOfNotValidrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfNotValid# { .. } => "oneOf",
355 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::PropertyNamesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#PropertyNames# { .. } => "propertyNames",
356 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Requiredrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Required# { .. } => "required",
357 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type# { .. } => "type",
358 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UnevaluatedItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedItems# { .. } => "unevaluatedItems",
359 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UnevaluatedPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedProperties# { .. } => "unevaluatedProperties",
360 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UniqueItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UniqueItems# => "uniqueItems",
361 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Referencingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Referencing#(_) => "$ref",
362 }
363 }
364 }
365
366 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
367 #[allow(missing_docs)]
368 pub enum TypeKindrust-analyzer cargo jsonschema 0.37.4 error/TypeKind# {
369 Singlerust-analyzer cargo jsonschema 0.37.4 error/TypeKind#Single#(JsonTyperust-analyzer cargo jsonschema 0.37.4 types/JsonType#),
370 Multiplerust-analyzer cargo jsonschema 0.37.4 error/TypeKind#Multiple#(JsonTypeSetrust-analyzer cargo jsonschema 0.37.4 types/JsonTypeSet#),
371 }
372
373 /// Shortcuts for creation of specific error kinds.
374 impl<'a> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
375 /// Creates a new validation error from parts.
376 #[inline]
377 #[must_use]
378 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn newrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]new().(
379 instance: Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'a, Valuerust-analyzer cargo serde_json 1.0.145 value/Value#>,
380 kind: ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#,
381 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
382 schema_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
383 ) -> Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`] {
384 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`] {
385 reprrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#repr.: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(ValidationErrorReprrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr# {
386 instancerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#instance.,
387 kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#kind.,
388 instance_pathrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#instance_path.,
389 schema_pathrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#schema_path.,
390 }),
391 }
392 }
393
394 /// Returns a reference to the instance that failed validation.
395 #[inline]
396 #[must_use]
397 pub fn instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(&self) -> &Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'a, Valuerust-analyzer cargo serde_json 1.0.145 value/Value#> {
398 &self.reprrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#repr..instancerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#instance.
399 }
400
401 /// Returns the kind of validation error.
402 #[inline]
403 #[must_use]
404 pub fn kindrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]kind().(&self) -> &ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind# {
405 &self.reprrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#repr..kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#kind.
406 }
407
408 /// Returns the JSON Pointer to the instance location that failed validation.
409 #[inline]
410 #[must_use]
411 pub fn instance_pathrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance_path().(&self) -> &Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location# {
412 &self.reprrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#repr..instance_pathrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#instance_path.
413 }
414
415 /// Returns the JSON Pointer to the schema keyword that failed validation.
416 #[inline]
417 #[must_use]
418 pub fn schema_pathrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]schema_path().(&self) -> &Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location# {
419 &self.reprrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#repr..schema_pathrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#schema_path.
420 }
421
422 /// Decomposes the error into owned parts.
423 #[inline]
424 #[must_use]
425 pub fn into_partsrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]into_parts().(self) -> (Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'a, Valuerust-analyzer cargo serde_json 1.0.145 value/Value#>, ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#, Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#, Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#) {
426 let repr = *rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Deref]deref().self.reprrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#repr.;
427 (
428 repr.instancerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#instance.,
429 repr.kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#kind.,
430 repr.instance_pathrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#instance_path.,
431 repr.schema_pathrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorRepr#schema_path.,
432 )
433 }
434
435 #[inline]
436 fn borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
437 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
438 kind: ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#,
439 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
440 schema_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
441 ) -> Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`] {
442 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::newrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]new().(Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#::Borrowedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#Borrowed#(instance), kind, instance_path, schema_path)
443 }
444
445 /// Returns a wrapper that masks instance values in error messages.
446 /// Uses "value" as a default placeholder.
447 #[must_use]
448 pub fn maskedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]masked().<'b>(&'b self) -> MaskedValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#<'a, 'b, 'static> {
449 self.masked_withrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]masked_with().("value")
450 }
451
452 /// Returns a wrapper that masks instance values in error messages with a custom placeholder.
453 pub fn masked_withrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]masked_with().<'b, 'c>(
454 &'b self,
455 placeholder: impl Intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#<Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'c, str>>,
456 ) -> MaskedValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#<'a, 'b, 'c> {
457 MaskedValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError# {
458 errorrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#error.: self,
459 placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.: placeholder.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
460 }
461 }
462 /// Converts the `ValidationError` into an owned version with `'static` lifetime.
463 #[must_use]
464 pub fn to_ownedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]to_owned().(self) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'static> {
465 let (instance, kind, instance_path, schema_path) = self.into_partsrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]into_parts().();
466 ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::newrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]new().(
467 Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#::Ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#Owned#(instance.into_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/impl#[`Cow<'_, B>`]into_owned().()),
468 kind,
469 instance_path,
470 schema_path,
471 )
472 }
473
474 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn additional_itemsrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]additional_items().(
475 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
476 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
477 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
478 limit: usize,
479 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
480 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
481 instance,
482 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AdditionalItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalItems#limit. },
483 instance_path,
484 location,
485 )
486 }
487 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn additional_propertiesrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]additional_properties().(
488 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
489 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
490 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
491 unexpected: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>,
492 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
493 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
494 instance,
495 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AdditionalPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalProperties# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalProperties#unexpected. },
496 instance_path,
497 location,
498 )
499 }
500 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn any_ofrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]any_of().(
501 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
502 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
503 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
504 context: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>>>,
505 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
506 let context = context
507 .into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().()
508 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|errors| errors.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::to_ownedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]to_owned().).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().())
509 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>();
510
511 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
512 instance,
513 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AnyOfrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AnyOf# { contextrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AnyOf#context. },
514 instance_path,
515 location,
516 )
517 }
518 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn backtrack_limitrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]backtrack_limit().(
519 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
520 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
521 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
522 error: fancy_regexrust-analyzer cargo fancy-regex 0.11.0 crate/::Errorrust-analyzer cargo fancy-regex 0.11.0 error/Error#,
523 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
524 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
525 instance,
526 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::BacktrackLimitExceededrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#BacktrackLimitExceeded# { errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#BacktrackLimitExceeded#error. },
527 instance_path,
528 location,
529 )
530 }
531 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn constant_arrayrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]constant_array().(
532 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
533 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
534 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
535 expected_value: &[Valuerust-analyzer cargo serde_json 1.0.145 value/Value#],
536 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
537 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
538 instance,
539 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Constantrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant# {
540 expected_valuerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant#expected_value.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#::Arrayrust-analyzer cargo serde_json 1.0.145 value/Value#Array#(expected_value.to_vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]to_vec().()),
541 },
542 instance_path,
543 location,
544 )
545 }
546 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn constant_booleanrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]constant_boolean().(
547 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
548 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
549 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
550 expected_value: bool,
551 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
552 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
553 instance,
554 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Constantrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant# {
555 expected_valuerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant#expected_value.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#::Boolrust-analyzer cargo serde_json 1.0.145 value/Value#Bool#(expected_value),
556 },
557 instance_path,
558 location,
559 )
560 }
561 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn constant_nullrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]constant_null().(
562 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
563 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
564 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
565 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
566 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
567 instance,
568 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Constantrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant# {
569 expected_valuerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant#expected_value.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#::Nullrust-analyzer cargo serde_json 1.0.145 value/Value#Null#,
570 },
571 instance_path,
572 location,
573 )
574 }
575 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn constant_numberrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]constant_number().(
576 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
577 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
578 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
579 expected_value: &Numberrust-analyzer cargo serde_json 1.0.145 number/Number#,
580 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
581 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
582 instance,
583 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Constantrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant# {
584 expected_valuerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant#expected_value.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#::Numberrust-analyzer cargo serde_json 1.0.145 value/Value#Number#(expected_value.clonerust-analyzer cargo serde_json 1.0.145 number/impl#[Number][Clone]clone().()),
585 },
586 instance_path,
587 location,
588 )
589 }
590 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn constant_objectrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]constant_object().(
591 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
592 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
593 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
594 expected_value: &Maprust-analyzer cargo serde_json 1.0.145 map/Map#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, Valuerust-analyzer cargo serde_json 1.0.145 value/Value#>,
595 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
596 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
597 instance,
598 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Constantrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant# {
599 expected_valuerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant#expected_value.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#::Objectrust-analyzer cargo serde_json 1.0.145 value/Value#Object#(expected_value.clonerust-analyzer cargo serde_json 1.0.145 map/impl#[`Map<String, Value>`][Clone]clone().()),
600 },
601 instance_path,
602 location,
603 )
604 }
605 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn constant_stringrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]constant_string().(
606 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
607 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
608 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
609 expected_value: &str,
610 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
611 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
612 instance,
613 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Constantrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant# {
614 expected_valuerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant#expected_value.: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#::Stringrust-analyzer cargo serde_json 1.0.145 value/Value#String#(expected_value.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()),
615 },
616 instance_path,
617 location,
618 )
619 }
620 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn containsrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]contains().(
621 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
622 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
623 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
624 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
625 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
626 instance,
627 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Containsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Contains#,
628 instance_path,
629 location,
630 )
631 }
632 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn content_encodingrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]content_encoding().(
633 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
634 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
635 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
636 encoding: &str,
637 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
638 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
639 instance,
640 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ContentEncodingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentEncoding# {
641 content_encodingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentEncoding#content_encoding.: encoding.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(),
642 },
643 instance_path,
644 location,
645 )
646 }
647 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn content_media_typerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]content_media_type().(
648 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
649 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
650 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
651 media_type: &str,
652 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
653 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
654 instance,
655 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ContentMediaTyperust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentMediaType# {
656 content_media_typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentMediaType#content_media_type.: media_type.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(),
657 },
658 instance_path,
659 location,
660 )
661 }
662 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn enumerationrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]enumeration().(
663 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
664 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
665 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
666 options: &Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
667 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
668 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
669 instance,
670 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Enumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Enum# {
671 optionsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Enum#options.: options.clonerust-analyzer cargo serde_json 1.0.145 value/impl#[Value][Clone]clone().(),
672 },
673 instance_path,
674 location,
675 )
676 }
677 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn exclusive_maximumrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]exclusive_maximum().(
678 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
679 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
680 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
681 limit: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
682 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
683 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
684 instance,
685 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ExclusiveMaximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMaximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMaximum#limit. },
686 instance_path,
687 location,
688 )
689 }
690 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn exclusive_minimumrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]exclusive_minimum().(
691 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
692 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
693 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
694 limit: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
695 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
696 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
697 instance,
698 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ExclusiveMinimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMinimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMinimum#limit. },
699 instance_path,
700 location,
701 )
702 }
703 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn false_schemarust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]false_schema().(
704 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
705 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
706 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
707 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
708 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
709 instance,
710 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::FalseSchemarust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FalseSchema#,
711 instance_path,
712 location,
713 )
714 }
715 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn formatrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]format().(
716 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
717 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
718 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
719 format: impl Intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>,
720 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
721 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
722 instance,
723 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Formatrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Format# {
724 formatrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Format#format.: format.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
725 },
726 instance_path,
727 location,
728 )
729 }
730 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn from_utf8rust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]from_utf8().(error: FromUtf8Errorrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/FromUtf8Error#) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
731 ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::newrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]new().(
732 Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#::Ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#Owned#(Valuerust-analyzer cargo serde_json 1.0.145 value/Value#::Nullrust-analyzer cargo serde_json 1.0.145 value/Value#Null#),
733 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::FromUtf8rust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FromUtf8# { errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FromUtf8#error. },
734 Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().(),
735 Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().(),
736 )
737 }
738 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn max_itemsrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]max_items().(
739 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
740 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
741 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
742 limit: u64,
743 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
744 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
745 instance,
746 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxItems#limit. },
747 instance_path,
748 location,
749 )
750 }
751 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn maximumrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]maximum().(
752 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
753 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
754 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
755 limit: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
756 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
757 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
758 instance,
759 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Maximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum#limit. },
760 instance_path,
761 location,
762 )
763 }
764 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn max_lengthrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]max_length().(
765 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
766 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
767 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
768 limit: u64,
769 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
770 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
771 instance,
772 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength#limit. },
773 instance_path,
774 location,
775 )
776 }
777 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn max_propertiesrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]max_properties().(
778 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
779 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
780 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
781 limit: u64,
782 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
783 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
784 instance,
785 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxProperties# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxProperties#limit. },
786 instance_path,
787 location,
788 )
789 }
790 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn min_itemsrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]min_items().(
791 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
792 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
793 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
794 limit: u64,
795 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
796 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
797 instance,
798 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinItems#limit. },
799 instance_path,
800 location,
801 )
802 }
803 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn minimumrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]minimum().(
804 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
805 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
806 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
807 limit: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
808 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
809 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
810 instance,
811 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit. },
812 instance_path,
813 location,
814 )
815 }
816 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn min_lengthrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]min_length().(
817 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
818 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
819 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
820 limit: u64,
821 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
822 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
823 instance,
824 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinLength# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinLength#limit. },
825 instance_path,
826 location,
827 )
828 }
829 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn min_propertiesrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]min_properties().(
830 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
831 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
832 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
833 limit: u64,
834 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
835 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
836 instance,
837 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinProperties# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinProperties#limit. },
838 instance_path,
839 location,
840 )
841 }
842 #[cfg(feature = "arbitrary-precision")]
843 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn multiple_ofrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]multiple_of().(
844 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
845 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
846 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
847 multiple_of: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
848 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
849 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
850 instance,
851 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MultipleOfrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MultipleOf# { multiple_ofrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MultipleOf#multiple_of. },
852 instance_path,
853 location,
854 )
855 }
856
857 #[cfg(not(feature = "arbitrary-precision"))]
858 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn multiple_of(
859 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
860 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
861 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
862 multiple_of: f64,
863 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
864 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowed(
865 instance,
866 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MultipleOfrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MultipleOf# { multiple_of },
867 instance_path,
868 location,
869 )
870 }
871 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn notrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]not().(
872 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
873 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
874 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
875 schema: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
876 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
877 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
878 instance,
879 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Notrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Not# { schemarust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Not#schema. },
880 instance_path,
881 location,
882 )
883 }
884 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn one_of_multiple_validrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]one_of_multiple_valid().(
885 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
886 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
887 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
888 context: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>>>,
889 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
890 let context = context
891 .into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().()
892 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|errors| errors.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::to_ownedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]to_owned().).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().())
893 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>();
894
895 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
896 instance,
897 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::OneOfMultipleValidrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfMultipleValid# { contextrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfMultipleValid#context. },
898 instance_path,
899 location,
900 )
901 }
902 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn one_of_not_validrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]one_of_not_valid().(
903 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
904 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
905 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
906 context: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>>>,
907 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
908 let context = context
909 .into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().()
910 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|errors| errors.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::to_ownedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]to_owned().).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().())
911 .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_>>();
912
913 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
914 instance,
915 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::OneOfNotValidrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfNotValid# { contextrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfNotValid#context. },
916 instance_path,
917 location,
918 )
919 }
920 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn patternrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]pattern().(
921 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
922 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
923 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
924 pattern: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#,
925 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
926 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
927 instance,
928 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Patternrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Pattern# { patternrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Pattern#pattern. },
929 instance_path,
930 location,
931 )
932 }
933 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn property_namesrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]property_names().(
934 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
935 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
936 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
937 error: ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>,
938 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
939 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
940 instance,
941 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::PropertyNamesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#PropertyNames# {
942 errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#PropertyNames#error.: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(error.to_ownedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]to_owned().()),
943 },
944 instance_path,
945 location,
946 )
947 }
948 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn requiredrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]required().(
949 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
950 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
951 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
952 property: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
953 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
954 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
955 instance,
956 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Requiredrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Required# { propertyrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Required#property. },
957 instance_path,
958 location,
959 )
960 }
961
962 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn single_type_errorrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]single_type_error().(
963 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
964 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
965 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
966 type_name: JsonTyperust-analyzer cargo jsonschema 0.37.4 types/JsonType#,
967 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
968 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
969 instance,
970 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type# {
971 kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type#kind.: TypeKindrust-analyzer cargo jsonschema 0.37.4 error/TypeKind#::Singlerust-analyzer cargo jsonschema 0.37.4 error/TypeKind#Single#(type_name),
972 },
973 instance_path,
974 location,
975 )
976 }
977 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn multiple_type_errorrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]multiple_type_error().(
978 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
979 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
980 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
981 types: JsonTypeSetrust-analyzer cargo jsonschema 0.37.4 types/JsonTypeSet#,
982 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
983 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
984 instance,
985 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type# {
986 kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type#kind.: TypeKindrust-analyzer cargo jsonschema 0.37.4 error/TypeKind#::Multiplerust-analyzer cargo jsonschema 0.37.4 error/TypeKind#Multiple#(types),
987 },
988 instance_path,
989 location,
990 )
991 }
992 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn unevaluated_itemsrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]unevaluated_items().(
993 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
994 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
995 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
996 unexpected: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>,
997 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
998 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
999 instance,
1000 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UnevaluatedItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedItems# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedItems#unexpected. },
1001 instance_path,
1002 location,
1003 )
1004 }
1005 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn unevaluated_propertiesrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]unevaluated_properties().(
1006 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
1007 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
1008 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
1009 unexpected: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>,
1010 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
1011 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
1012 instance,
1013 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UnevaluatedPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedProperties# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedProperties#unexpected. },
1014 instance_path,
1015 location,
1016 )
1017 }
1018 pub(craterust-analyzer cargo jsonschema 0.37.4 crate/) fn unique_itemsrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]unique_items().(
1019 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
1020 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
1021 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
1022 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
1023 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
1024 instance,
1025 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UniqueItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UniqueItems#,
1026 instance_path,
1027 location,
1028 )
1029 }
1030 /// Create a new custom validation error.
1031 pub fn customrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]custom().(
1032 location: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
1033 instance_path: Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#,
1034 instance: &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
1035 message: impl Intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>,
1036 ) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a> {
1037 Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]::borrowedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]borrowed().(
1038 instance,
1039 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Customrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Custom# {
1040 messagerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Custom#message.: message.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
1041 },
1042 instance_path,
1043 location,
1044 )
1045 }
1046 }
1047
1048 impl errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# for ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'_> {}
1049 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<referencingrust-analyzer cargo referencing 0.37.4 crate/::Errorrust-analyzer cargo referencing 0.37.4 error/Error#> for ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'_> {
1050 #[inline]
1051 fn fromrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'_>`][`From<referencing::Error>`]from().(err: referencingrust-analyzer cargo referencing 0.37.4 crate/::Errorrust-analyzer cargo referencing 0.37.4 error/Error#) -> Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'_>`][`From<referencing::Error>`] {
1052 ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::newrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]new().(
1053 Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#::Ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#Owned#(Valuerust-analyzer cargo serde_json 1.0.145 value/Value#::Nullrust-analyzer cargo serde_json 1.0.145 value/Value#Null#),
1054 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Referencingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Referencing#(err),
1055 Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().(),
1056 Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().(),
1057 )
1058 }
1059 }
1060 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<FromUtf8Errorrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/FromUtf8Error#> for ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'_> {
1061 #[inline]
1062 fn fromrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'_>`][`From<FromUtf8Error>`]from().(err: FromUtf8Errorrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/FromUtf8Error#) -> Selfrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'_>`][`From<FromUtf8Error>`] {
1063 ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::from_utf8rust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]from_utf8().(err)
1064 }
1065 }
1066
1067 fn write_quoted_listrust-analyzer cargo jsonschema 0.37.4 error/write_quoted_list().(f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>, items: &[impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#]) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
1068 let mut iter = items.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().();
1069 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(item) = iter.nextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]next().() {
1070 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('\'')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1071 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{item}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1072 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('\'')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1073 }
1074 for item in iter {
1075 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(", ")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1076 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('\'')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1077 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{item}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1078 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('\'')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1079 }
1080 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
1081 }
1082
1083 fn write_unexpected_suffixrust-analyzer cargo jsonschema 0.37.4 error/write_unexpected_suffix().(f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>, len: usize) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
1084 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(if len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().1 {
1085 " was unexpected)"
1086 } else {
1087 " were unexpected)"
1088 })
1089 }
1090
1091 const MAX_DISPLAYED_ENUM_VARIANTSrust-analyzer cargo jsonschema 0.37.4 error/MAX_DISPLAYED_ENUM_VARIANTS.: usize = 3;
1092
1093 fn write_enum_messagerust-analyzer cargo jsonschema 0.37.4 error/write_enum_message().(
1094 f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>,
1095 value: impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#,
1096 options: &Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
1097 ) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
1098 let array = options
1099 .as_arrayrust-analyzer cargo serde_json 1.0.145 value/impl#[Value]as_array().()
1100 .expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]expect().("Enum options must be a JSON array");
1101
1102 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{value} is not one of ")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1103
1104 let total_count = array.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().();
1105
1106 if total_count rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]le().MAX_DISPLAYED_ENUM_VARIANTSrust-analyzer cargo jsonschema 0.37.4 error/MAX_DISPLAYED_ENUM_VARIANTS. {
1107 // Show all options with proper "a, b or c" formatting
1108 for (i, option) in array.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() {
1109 if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().0 {
1110 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{option}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1111 } else if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().total_count rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1 {
1112 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, " or {option}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1113 } else {
1114 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, ", {option}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1115 }
1116 }
1117 } else {
1118 // Show first few, then "or X other candidates"
1119 let show_count = MAX_DISPLAYED_ENUM_VARIANTSrust-analyzer cargo jsonschema 0.37.4 error/MAX_DISPLAYED_ENUM_VARIANTS. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1;
1120 for (i, option) in array.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(show_count).enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() {
1121 if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().0 {
1122 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{option}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1123 } else {
1124 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, ", {option}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1125 }
1126 }
1127 let remaining = total_count rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().show_count;
1128 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, " or {remaining} other candidates")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1129 }
1130 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
1131 }
1132
1133 /// Textual representation of various validation errors.
1134 impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'_> {
1135 #[allow(clippy::too_many_lines)] // The function is long but it does formatting only
1136 fn fmtrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'_>`][Display]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
1137 match self.kindrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]kind().() {
1138 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Referencingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Referencing#(error) => error.fmtrust-analyzer cargo referencing 0.37.4 error/impl#[Error][Display]fmt().(f),
1139 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::BacktrackLimitExceededrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#BacktrackLimitExceeded# { errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#BacktrackLimitExceeded#error. } => error.fmtrust-analyzer cargo fancy-regex 0.11.0 error/impl#[Error][Display]fmt().(f),
1140 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Formatrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Format# { formatrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Format#format. } => {
1141 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, r#"{} is not a "{}""#, self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(), format)
1142 }
1143 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AdditionalItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalItems#limit. } => {
1144 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("Additional items are not allowed (")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1145 let array = self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().().as_arrayrust-analyzer cargo serde_json 1.0.145 value/impl#[Value]as_array().().expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]expect().("Always valid");
1146 let mut iter = array.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().skiprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#skip().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit);
1147
1148 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(item) = iter.nextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/adapters/skip/impl#[`Skip<I>`][Iterator]next().() {
1149 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{item}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1150 }
1151 for item in iter {
1152 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(", ")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1153 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{item}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1154 }
1155
1156 write_unexpected_suffixrust-analyzer cargo jsonschema 0.37.4 error/write_unexpected_suffix().(f, array.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<&usize>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<&usize>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<&usize>`]sub().limit)
1157 }
1158 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AdditionalPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalProperties# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalProperties#unexpected. } => {
1159 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("Additional properties are not allowed (")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1160 write_quoted_listrust-analyzer cargo jsonschema 0.37.4 error/write_quoted_list().(f, unexpected)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1161 write_unexpected_suffixrust-analyzer cargo jsonschema 0.37.4 error/write_unexpected_suffix().(f, unexpected.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().())
1162 }
1163 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AnyOfrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AnyOf# { contextrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AnyOf#context.: _ } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1164 f,
1165 "{} is not valid under any of the schemas listed in the 'anyOf' keyword",
1166 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().()
1167 ),
1168 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::OneOfNotValidrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfNotValid# { contextrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfNotValid#context.: _ } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1169 f,
1170 "{} is not valid under any of the schemas listed in the 'oneOf' keyword",
1171 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().()
1172 ),
1173 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Containsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Contains# => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1174 f,
1175 "None of {} are valid under the given schema",
1176 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().()
1177 ),
1178 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Constantrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant# { expected_valuerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant#expected_value. } => {
1179 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{expected_value} was expected")
1180 }
1181 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ContentEncodingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentEncoding# { content_encodingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentEncoding#content_encoding. } => {
1182 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1183 f,
1184 r#"{} is not compliant with "{}" content encoding"#,
1185 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1186 content_encoding
1187 )
1188 }
1189 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ContentMediaTyperust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentMediaType# { content_media_typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentMediaType#content_media_type. } => {
1190 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1191 f,
1192 r#"{} is not compliant with "{}" media type"#,
1193 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1194 content_media_type
1195 )
1196 }
1197 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::FromUtf8rust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FromUtf8# { errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FromUtf8#error. } => error.fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[FromUtf8Error][Display]fmt().(f),
1198 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Enumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Enum# { optionsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Enum#options. } => {
1199 write_enum_messagerust-analyzer cargo jsonschema 0.37.4 error/write_enum_message().(f, self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(), options)
1200 }
1201 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ExclusiveMaximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMaximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMaximum#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1202 f,
1203 "{} is greater than or equal to the maximum of {}",
1204 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1205 limit
1206 ),
1207 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ExclusiveMinimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMinimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMinimum#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1208 f,
1209 "{} is less than or equal to the minimum of {}",
1210 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1211 limit
1212 ),
1213 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::FalseSchemarust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FalseSchema# => {
1214 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "False schema does not allow {}", self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().())
1215 }
1216 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Maximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1217 f,
1218 "{} is greater than the maximum of {}",
1219 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1220 limit
1221 ),
1222 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit. } => {
1223 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1224 f,
1225 "{} is less than the minimum of {}",
1226 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1227 limit
1228 )
1229 }
1230 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1231 f,
1232 "{} is longer than {} character{}",
1233 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1234 limit,
1235 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "" } else { "s" }
1236 ),
1237 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinLength# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinLength#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1238 f,
1239 "{} is shorter than {} character{}",
1240 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1241 limit,
1242 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "" } else { "s" }
1243 ),
1244 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxItems#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1245 f,
1246 "{} has more than {} item{}",
1247 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1248 limit,
1249 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "" } else { "s" }
1250 ),
1251 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinItems#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1252 f,
1253 "{} has less than {} item{}",
1254 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1255 limit,
1256 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "" } else { "s" }
1257 ),
1258 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxProperties# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxProperties#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1259 f,
1260 "{} has more than {} propert{}",
1261 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1262 limit,
1263 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "y" } else { "ies" }
1264 ),
1265 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinProperties# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinProperties#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1266 f,
1267 "{} has less than {} propert{}",
1268 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1269 limit,
1270 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "y" } else { "ies" }
1271 ),
1272 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Notrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Not# { schemarust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Not#schema. } => {
1273 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{} is not allowed for {}", schema, self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().())
1274 }
1275 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::OneOfMultipleValidrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfMultipleValid# { .. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1276 f,
1277 "{} is valid under more than one of the schemas listed in the 'oneOf' keyword",
1278 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().()
1279 ),
1280 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Patternrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Pattern# { patternrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Pattern#pattern. } => {
1281 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, r#"{} does not match "{}""#, self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(), pattern)
1282 }
1283 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::PropertyNamesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#PropertyNames# { errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#PropertyNames#error. } => error.fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Display]fmt().(f),
1284 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Requiredrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Required# { propertyrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Required#property. } => {
1285 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{property} is a required property")
1286 }
1287 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MultipleOfrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MultipleOf# { multiple_ofrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MultipleOf#multiple_of. } => {
1288 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1289 f,
1290 "{} is not a multiple of {}",
1291 self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(),
1292 multiple_of
1293 )
1294 }
1295 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UnevaluatedItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedItems# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedItems#unexpected. } => {
1296 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("Unevaluated items are not allowed (")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1297 write_quoted_listrust-analyzer cargo jsonschema 0.37.4 error/write_quoted_list().(f, unexpected)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1298 write_unexpected_suffixrust-analyzer cargo jsonschema 0.37.4 error/write_unexpected_suffix().(f, unexpected.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().())
1299 }
1300 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UnevaluatedPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedProperties# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedProperties#unexpected. } => {
1301 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("Unevaluated properties are not allowed (")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1302 write_quoted_listrust-analyzer cargo jsonschema 0.37.4 error/write_quoted_list().(f, unexpected)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1303 write_unexpected_suffixrust-analyzer cargo jsonschema 0.37.4 error/write_unexpected_suffix().(f, unexpected.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().())
1304 }
1305 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UniqueItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UniqueItems# => {
1306 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{} has non-unique elements", self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().())
1307 }
1308 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type# {
1309 kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type#kind.: TypeKindrust-analyzer cargo jsonschema 0.37.4 error/TypeKind#::Singlerust-analyzer cargo jsonschema 0.37.4 error/TypeKind#Single#(type_),
1310 } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, r#"{} is not of type "{}""#, self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().(), type_),
1311 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type# {
1312 kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type#kind.: TypeKindrust-analyzer cargo jsonschema 0.37.4 error/TypeKind#::Multiplerust-analyzer cargo jsonschema 0.37.4 error/TypeKind#Multiple#(types),
1313 } => {
1314 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{} is not of types ", self.instancerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance().())?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1315 let mut iter = types.iterrust-analyzer cargo jsonschema 0.37.4 types/impl#[JsonTypeSet]iter().();
1316 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(t) = iter.nextrust-analyzer cargo jsonschema 0.37.4 types/impl#[JsonTypeSetIterator][Iterator]next().() {
1317 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('"')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1318 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{t}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1319 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('"')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1320 }
1321 for t in iter {
1322 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(", ")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1323 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('"')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1324 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{t}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1325 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('"')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1326 }
1327 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
1328 }
1329 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Customrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Custom# { messagerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Custom#message. } => f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(message),
1330 }
1331 }
1332 }
1333
1334 /// A wrapper that provides a masked display of validation errors.
1335 pub struct MaskedValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#<'a, 'b, 'c> {
1336 errorrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#error.: &'b ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'a>,
1337 placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.: Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#<'c, str>,
1338 }
1339
1340 impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for MaskedValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#<'_, '_, '_> {
1341 #[allow(clippy::too_many_lines)]
1342 fn fmtrust-analyzer cargo jsonschema 0.37.4 error/impl#[`MaskedValidationError<'_, '_, '_>`][Display]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
1343 match self.errorrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#error..kindrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]kind().() {
1344 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Referencingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Referencing#(error) => error.fmtrust-analyzer cargo referencing 0.37.4 error/impl#[Error][Display]fmt().(f),
1345 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::BacktrackLimitExceededrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#BacktrackLimitExceeded# { errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#BacktrackLimitExceeded#error. } => error.fmtrust-analyzer cargo fancy-regex 0.11.0 error/impl#[Error][Display]fmt().(f),
1346 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Formatrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Format# { formatrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Format#format. } => {
1347 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, r#"{} is not a "{format}""#, self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.)
1348 }
1349 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AdditionalItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalItems#limit. } => {
1350 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "Additional items are not allowed ({limit} items)")
1351 }
1352 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AdditionalPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalProperties# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalProperties#unexpected. } => {
1353 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("Additional properties are not allowed (")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1354 write_quoted_listrust-analyzer cargo jsonschema 0.37.4 error/write_quoted_list().(f, unexpected)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1355 write_unexpected_suffixrust-analyzer cargo jsonschema 0.37.4 error/write_unexpected_suffix().(f, unexpected.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().())
1356 }
1357 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AnyOfrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AnyOf# { .. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1358 f,
1359 "{} is not valid under any of the schemas listed in the 'anyOf' keyword",
1360 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.
1361 ),
1362 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::OneOfNotValidrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfNotValid# { contextrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfNotValid#context.: _ } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1363 f,
1364 "{} is not valid under any of the schemas listed in the 'oneOf' keyword",
1365 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.
1366 ),
1367 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Containsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Contains# => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1368 f,
1369 "None of {} are valid under the given schema",
1370 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.
1371 ),
1372 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Constantrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant# { expected_valuerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Constant#expected_value. } => {
1373 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{expected_value} was expected")
1374 }
1375 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ContentEncodingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentEncoding# { content_encodingrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentEncoding#content_encoding. } => {
1376 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1377 f,
1378 r#"{} is not compliant with "{}" content encoding"#,
1379 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder., content_encoding
1380 )
1381 }
1382 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ContentMediaTyperust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentMediaType# { content_media_typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ContentMediaType#content_media_type. } => {
1383 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1384 f,
1385 r#"{} is not compliant with "{}" media type"#,
1386 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder., content_media_type
1387 )
1388 }
1389 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::FromUtf8rust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FromUtf8# { errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FromUtf8#error. } => error.fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[FromUtf8Error][Display]fmt().(f),
1390 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Enumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Enum# { optionsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Enum#options. } => {
1391 write_enum_messagerust-analyzer cargo jsonschema 0.37.4 error/write_enum_message().(f, &self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder., options)
1392 }
1393 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ExclusiveMaximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMaximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMaximum#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1394 f,
1395 "{} is greater than or equal to the maximum of {}",
1396 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder., limit
1397 ),
1398 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::ExclusiveMinimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMinimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#ExclusiveMinimum#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1399 f,
1400 "{} is less than or equal to the minimum of {}",
1401 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder., limit
1402 ),
1403 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::FalseSchemarust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#FalseSchema# => {
1404 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "False schema does not allow {}", self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.)
1405 }
1406 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Maximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1407 f,
1408 "{} is greater than the maximum of {}",
1409 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder., limit
1410 ),
1411 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit. } => {
1412 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1413 f,
1414 "{} is less than the minimum of {}",
1415 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder., limit
1416 )
1417 }
1418 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1419 f,
1420 "{} is longer than {} character{}",
1421 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.,
1422 limit,
1423 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "" } else { "s" }
1424 ),
1425 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinLength# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinLength#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1426 f,
1427 "{} is shorter than {} character{}",
1428 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.,
1429 limit,
1430 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "" } else { "s" }
1431 ),
1432 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxItems#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1433 f,
1434 "{} has more than {} item{}",
1435 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.,
1436 limit,
1437 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "" } else { "s" }
1438 ),
1439 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinItems# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinItems#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1440 f,
1441 "{} has less than {} item{}",
1442 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.,
1443 limit,
1444 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "" } else { "s" }
1445 ),
1446 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxProperties# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxProperties#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1447 f,
1448 "{} has more than {} propert{}",
1449 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.,
1450 limit,
1451 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "y" } else { "ies" }
1452 ),
1453 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MinPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinProperties# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MinProperties#limit. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1454 f,
1455 "{} has less than {} propert{}",
1456 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.,
1457 limit,
1458 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().limit == 1 { "y" } else { "ies" }
1459 ),
1460 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Notrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Not# { schemarust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Not#schema. } => {
1461 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{} is not allowed for {}", schema, self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.)
1462 }
1463 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::OneOfMultipleValidrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#OneOfMultipleValid# { .. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1464 f,
1465 "{} is valid under more than one of the schemas listed in the 'oneOf' keyword",
1466 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.
1467 ),
1468 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Patternrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Pattern# { patternrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Pattern#pattern. } => {
1469 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, r#"{} does not match "{}""#, self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder., pattern)
1470 }
1471 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::PropertyNamesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#PropertyNames# { errorrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#PropertyNames#error. } => error.fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Display]fmt().(f),
1472 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Requiredrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Required# { propertyrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Required#property. } => {
1473 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{property} is a required property")
1474 }
1475 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MultipleOfrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MultipleOf# { multiple_ofrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MultipleOf#multiple_of. } => {
1476 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1477 f,
1478 "{} is not a multiple of {}",
1479 self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder., multiple_of
1480 )
1481 }
1482 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UnevaluatedItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedItems# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedItems#unexpected. } => {
1483 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
1484 f,
1485 "Unevaluated items are not allowed ({} items)",
1486 unexpected.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().()
1487 )
1488 }
1489 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UnevaluatedPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedProperties# { unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UnevaluatedProperties#unexpected. } => {
1490 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("Unevaluated properties are not allowed (")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1491 write_quoted_listrust-analyzer cargo jsonschema 0.37.4 error/write_quoted_list().(f, unexpected)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1492 write_unexpected_suffixrust-analyzer cargo jsonschema 0.37.4 error/write_unexpected_suffix().(f, unexpected.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().())
1493 }
1494 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UniqueItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UniqueItems# => {
1495 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{} has non-unique elements", self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.)
1496 }
1497 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type# {
1498 kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type#kind.: TypeKindrust-analyzer cargo jsonschema 0.37.4 error/TypeKind#::Singlerust-analyzer cargo jsonschema 0.37.4 error/TypeKind#Single#(type_),
1499 } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, r#"{} is not of type "{}""#, self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder., type_),
1500 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type# {
1501 kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type#kind.: TypeKindrust-analyzer cargo jsonschema 0.37.4 error/TypeKind#::Multiplerust-analyzer cargo jsonschema 0.37.4 error/TypeKind#Multiple#(types),
1502 } => {
1503 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{} is not of types ", self.placeholderrust-analyzer cargo jsonschema 0.37.4 error/MaskedValidationError#placeholder.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1504 let mut iter = types.iterrust-analyzer cargo jsonschema 0.37.4 types/impl#[JsonTypeSet]iter().();
1505 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(t) = iter.nextrust-analyzer cargo jsonschema 0.37.4 types/impl#[JsonTypeSetIterator][Iterator]next().() {
1506 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('"')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1507 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{t}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1508 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('"')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1509 }
1510 for t in iter {
1511 f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(", ")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1512 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('"')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1513 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{t}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1514 f.write_charrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'_>`][Write]write_char().('"')?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1515 }
1516 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
1517 }
1518 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Customrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Custom# { messagerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Custom#message. } => f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().(message),
1519 }
1520 }
1521 }
1522
1523 #[cfg(test)]
1524 mod testsrust-analyzer cargo jsonschema 0.37.4 error/tests/ {
1525 use superrust-analyzer cargo jsonschema 0.37.4 error/::*;
1526 use serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::jsonrust-analyzer cargo serde_json 1.0.145 macros/json!;
1527
1528 use test_caserust-analyzer cargo test-case 3.3.1 crate/::test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:;
1529
1530 fn owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(instance: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#, kind: ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#) -> ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#<'static> {
1531 ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::newrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]new().(Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#::Ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#Owned#(instance), kind, Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().(), Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().())
1532 }
1533
1534 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1535 fn error_iterator_into_errors_collects_all_errorsrust-analyzer cargo jsonschema 0.37.4 error/tests/error_iterator_into_errors_collects_all_errors().() {
1536 let iterator = ErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#::from_iteratorrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`]from_iterator().(
1537 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1538 owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(1), ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) }),
1539 owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(3), ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Maximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) }),
1540 ]
1541 .into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().(),
1542 );
1543 let validation_errors = iterator.into_errorsrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`]into_errors().();
1544 let collected: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_> = validation_errors.into_iterrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`][IntoIterator]into_iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
1545 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(collected.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().(), 2);
1546 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(collected[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().0]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), "1 is less than the minimum of 2");
1547 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1548 collected[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().1]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(),
1549 "3 is greater than the maximum of 2"
1550 );
1551 }
1552
1553 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1554 fn validation_errors_display_reports_successrust-analyzer cargo jsonschema 0.37.4 error/tests/validation_errors_display_reports_success().() {
1555 let errors = ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors# { errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().() };
1556 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{errors}"), "Validation succeeded");
1557 }
1558
1559 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1560 fn validation_errors_display_lists_messagesrust-analyzer cargo jsonschema 0.37.4 error/tests/validation_errors_display_lists_messages().() {
1561 let errors = ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors# {
1562 errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1563 owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(1), ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) }),
1564 owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(3), ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Maximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) }),
1565 ],
1566 };
1567 let rendered = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{errors}");
1568 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(rendered.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().("Validation errors:"));
1569 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(rendered.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().("01: 1 is less than the minimum of 2"));
1570 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(rendered.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().("02: 3 is greater than the maximum of 2"));
1571 }
1572
1573 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1574 fn validation_errors_len_and_is_emptyrust-analyzer cargo jsonschema 0.37.4 error/tests/validation_errors_len_and_is_empty().() {
1575 let empty = ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors# { errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![] };
1576 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(empty.lenrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]len().(), 0);
1577 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(empty.is_emptyrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]is_empty().());
1578
1579 let errors = ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors# {
1580 errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(
1581 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(1),
1582 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) },
1583 )],
1584 };
1585 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(errors.lenrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]len().(), 1);
1586 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(!rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().errors.is_emptyrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]is_empty().());
1587 }
1588
1589 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1590 fn validation_errors_as_slicerust-analyzer cargo jsonschema 0.37.4 error/tests/validation_errors_as_slice().() {
1591 let errors = ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors# {
1592 errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1593 owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(1), ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) }),
1594 owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(3), ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Maximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) }),
1595 ],
1596 };
1597
1598 let slice = errors.as_slicerust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]as_slice().();
1599 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(slice.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().(), 2);
1600 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), "1 is less than the minimum of 2");
1601 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), "3 is greater than the maximum of 2");
1602 }
1603
1604 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1605 fn validation_errors_iterrust-analyzer cargo jsonschema 0.37.4 error/tests/validation_errors_iter().() {
1606 let errors = ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors# {
1607 errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1608 owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(1), ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) }),
1609 owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(3), ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Maximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) }),
1610 ],
1611 };
1612
1613 let collected: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_> = errors.iterrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
1614 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(collected.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().(), 2);
1615 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(collected[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().0]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()., "1 is less than the minimum of 2");
1616 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(collected[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().1]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()., "3 is greater than the maximum of 2");
1617 }
1618
1619 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1620 #[allow(clippy::explicit_iter_loop)]
1621 fn validation_errors_iter_mutrust-analyzer cargo jsonschema 0.37.4 error/tests/validation_errors_iter_mut().() {
1622 let mut errors = ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors# {
1623 errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(
1624 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(1),
1625 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) },
1626 )],
1627 };
1628
1629 // Verify we can get mutable references via iter_mut()
1630 for error in errors.iter_mutrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]iter_mut().() {
1631 let _ = error.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().();
1632 }
1633 }
1634
1635 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1636 fn validation_errors_into_iterator_by_refrust-analyzer cargo jsonschema 0.37.4 error/tests/validation_errors_into_iterator_by_ref().() {
1637 let errors = ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors# {
1638 errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(
1639 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(1),
1640 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) },
1641 )],
1642 };
1643
1644 let collected: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_> = (&errors).into_iterrust-analyzer cargo jsonschema 0.37.4 error/impl#[`&'b ValidationErrors<'a>`][IntoIterator]into_iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
1645 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(collected.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().(), 1);
1646 // Verify errors is still usable
1647 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(errors.lenrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]len().(), 1);
1648 }
1649
1650 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1651 fn validation_errors_into_iterator_by_mut_refrust-analyzer cargo jsonschema 0.37.4 error/tests/validation_errors_into_iterator_by_mut_ref().() {
1652 let mut errors = ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors# {
1653 errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(
1654 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(1),
1655 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) },
1656 )],
1657 };
1658
1659 let collected: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_> = (&mut errors).into_iterrust-analyzer cargo jsonschema 0.37.4 error/impl#[`&'b mut ValidationErrors<'a>`][IntoIterator]into_iter().().collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
1660 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(collected.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().(), 1);
1661 // Verify errors is still usable
1662 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(errors.lenrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationErrors<'a>`]len().(), 1);
1663 }
1664
1665 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1666 fn error_iterator_size_hintrust-analyzer cargo jsonschema 0.37.4 error/tests/error_iterator_size_hint().() {
1667 let vec = vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
1668 owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(1), ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) }),
1669 owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(3), ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Maximumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Maximum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) }),
1670 ];
1671 let iterator = ErrorIteratorrust-analyzer cargo jsonschema 0.37.4 error/ErrorIterator#::from_iteratorrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`]from_iterator().(vec.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().());
1672 let (lower, upper) = iterator.size_hintrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]size_hint().();
1673 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(lower, 2);
1674 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(upper, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2));
1675 }
1676
1677 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1678 fn validation_errors_debugrust-analyzer cargo jsonschema 0.37.4 error/tests/validation_errors_debug().() {
1679 let errors = ValidationErrorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors# {
1680 errorsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrors#errors.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![owned_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/owned_error().(
1681 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(1),
1682 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(2) },
1683 )],
1684 };
1685 let debug_output = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{errors:?}");
1686 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(debug_output.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().("ValidationErrors"));
1687 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(debug_output.containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]contains().("errors"));
1688 }
1689
1690 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1691 fn single_type_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/single_type_error().() {
1692 let instance = jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(42);
1693 let err = ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::single_type_errorrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]single_type_error().(
1694 Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().(),
1695 Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().(),
1696 &instance,
1697 JsonTyperust-analyzer cargo jsonschema 0.37.4 types/JsonType#::Stringrust-analyzer cargo jsonschema 0.37.4 types/JsonType#String#,
1698 );
1699 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(err.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), r#"42 is not of type "string""#);
1700 }
1701
1702 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1703 fn multiple_types_errorrust-analyzer cargo jsonschema 0.37.4 error/tests/multiple_types_error().() {
1704 let instance = jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(42);
1705 let types = JsonTypeSetrust-analyzer cargo jsonschema 0.37.4 types/JsonTypeSet#::emptyrust-analyzer cargo jsonschema 0.37.4 types/impl#[JsonTypeSet]empty().()
1706 .insertrust-analyzer cargo jsonschema 0.37.4 types/impl#[JsonTypeSet]insert().(JsonTyperust-analyzer cargo jsonschema 0.37.4 types/JsonType#::Stringrust-analyzer cargo jsonschema 0.37.4 types/JsonType#String#)
1707 .insertrust-analyzer cargo jsonschema 0.37.4 types/impl#[JsonTypeSet]insert().(JsonTyperust-analyzer cargo jsonschema 0.37.4 types/JsonType#::Numberrust-analyzer cargo jsonschema 0.37.4 types/JsonType#Number#);
1708 let err = ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::multiple_type_errorrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]multiple_type_error().(
1709 Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().(),
1710 Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().(),
1711 &instance,
1712 types,
1713 );
1714 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(err.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), r#"42 is not of types "number", "string""#);
1715 }
1716
1717 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(true, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!({"foo": {"bar": 42}}), "/foo/bar")]
1718 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(true, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!({"foo": "a"}), "/foo")]
1719 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(false, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!({"foo": {"bar": 42}}), "/foo/bar")]
1720 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(false, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!({"foo": "a"}), "/foo")]
1721 fn instance_path_propertiesrust-analyzer cargo jsonschema 0.37.4 error/tests/instance_path_properties().(additional_properties: bool, instance: &Valuerust-analyzer cargo serde_json 1.0.145 value/Value#, expected: &str) {
1722 let schema = jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(
1723 {
1724 "additionalProperties": additional_properties,
1725 "type":"object",
1726 "properties":{
1727 "foo":{
1728 "type":"object",
1729 "properties":{
1730 "bar":{
1731 "type":"string"
1732 }
1733 }
1734 }
1735 }
1736 }
1737 );
1738 let validator = craterust-analyzer cargo jsonschema 0.37.4 crate/::validator_forrust-analyzer cargo jsonschema 0.37.4 validator_for().(&schema).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1739 let mut result = validator.iter_errorsrust-analyzer cargo jsonschema 0.37.4 validator/impl#[Validator]iter_errors().(instance);
1740 let error = result.nextrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]next().().expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]expect().("validation error");
1741
1742 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(result.nextrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]next().().is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().());
1743 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(error.instance_pathrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance_path().().as_strrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]as_str().(), expected);
1744 }
1745
1746 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(true, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!([1, {"foo": ["42"]}]), "/0")]
1747 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(true, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(["a", {"foo": [42]}]), "/1/foo/0")]
1748 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(false, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!([1, {"foo": ["42"]}]), "/0")]
1749 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(false, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(["a", {"foo": [42]}]), "/1/foo/0")]
1750 fn instance_path_properties_and_arraysrust-analyzer cargo jsonschema 0.37.4 error/tests/instance_path_properties_and_arrays().(
1751 additional_items: bool,
1752 instance: &Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
1753 expected: &str,
1754 ) {
1755 let schema = jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(
1756 {
1757 "items": additional_items,
1758 "type": "array",
1759 "prefixItems": [
1760 {
1761 "type": "string"
1762 },
1763 {
1764 "type": "object",
1765 "properties": {
1766 "foo": {
1767 "type": "array",
1768 "prefixItems": [
1769 {
1770 "type": "string"
1771 }
1772 ]
1773 }
1774 }
1775 }
1776 ]
1777 }
1778 );
1779 let validator = craterust-analyzer cargo jsonschema 0.37.4 crate/::validator_forrust-analyzer cargo jsonschema 0.37.4 validator_for().(&schema).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1780 let mut result = validator.iter_errorsrust-analyzer cargo jsonschema 0.37.4 validator/impl#[Validator]iter_errors().(instance);
1781 let error = result.nextrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]next().().expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]expect().("validation error");
1782
1783 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(result.nextrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]next().().is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().());
1784 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(error.instance_pathrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance_path().().as_strrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]as_str().(), expected);
1785 }
1786
1787 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(true, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!([[1, 2, 3], [4, "5", 6], [7, 8, 9]]), "/1/1")]
1788 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(false, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!([[1, 2, 3], [4, "5", 6], [7, 8, 9]]), "/1/1")]
1789 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(true, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!([[1, 2, 3], [4, 5, 6], 42]), "/2")]
1790 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(false, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!([[1, 2, 3], [4, 5, 6], 42]), "/2")]
1791 fn instance_path_nested_arraysrust-analyzer cargo jsonschema 0.37.4 error/tests/instance_path_nested_arrays().(additional_items: bool, instance: &Valuerust-analyzer cargo serde_json 1.0.145 value/Value#, expected: &str) {
1792 let schema = jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(
1793 {
1794 "additionalItems": additional_items,
1795 "type": "array",
1796 "items": {
1797 "type": "array",
1798 "items": {
1799 "type": "integer"
1800 }
1801 }
1802 }
1803 );
1804 let validator = craterust-analyzer cargo jsonschema 0.37.4 crate/::validator_forrust-analyzer cargo jsonschema 0.37.4 validator_for().(&schema).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1805 let mut result = validator.iter_errorsrust-analyzer cargo jsonschema 0.37.4 validator/impl#[Validator]iter_errors().(instance);
1806 let error = result.nextrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]next().().expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]expect().("validation error");
1807
1808 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(result.nextrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]next().().is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().());
1809 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(error.instance_pathrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance_path().().as_strrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]as_str().(), expected);
1810 }
1811
1812 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(true, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!([1, "a"]), "/1")]
1813 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(false, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!([1, "a"]), "/1")]
1814 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(true, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(123), "")]
1815 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(false, &jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(123), "")]
1816 fn instance_path_arraysrust-analyzer cargo jsonschema 0.37.4 error/tests/instance_path_arrays().(additional_items: bool, instance: &Valuerust-analyzer cargo serde_json 1.0.145 value/Value#, expected: &str) {
1817 let schema = jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(
1818 {
1819 "additionalItems": additional_items,
1820 "type": "array",
1821 "items": {
1822 "type": "integer"
1823 }
1824 }
1825 );
1826 let validator = craterust-analyzer cargo jsonschema 0.37.4 crate/::validator_forrust-analyzer cargo jsonschema 0.37.4 validator_for().(&schema).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1827 let mut result = validator.iter_errorsrust-analyzer cargo jsonschema 0.37.4 validator/impl#[Validator]iter_errors().(instance);
1828 let error = result.nextrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]next().().expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]expect().("validation error");
1829
1830 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(result.nextrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ErrorIterator<'a>`][Iterator]next().().is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().());
1831 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(error.instance_pathrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]instance_path().().as_strrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]as_str().(), expected);
1832 }
1833
1834 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
1835 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!("2023-13-45"),
1836 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Formatrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Format# {
1837 formatrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Format#format.: "date".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(),
1838 },
1839 "value is not a \"date\""
1840 )]
1841 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
1842 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!("sensitive data"),
1843 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength#limit.: 5 },
1844 "value is longer than 5 characters"
1845 )]
1846 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
1847 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!({"secret": "data", "key": "value"}),
1848 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::AdditionalPropertiesrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalProperties# {
1849 unexpectedrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#AdditionalProperties#unexpected.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!!["secret".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), "key".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()]
1850 },
1851 "Additional properties are not allowed ('secret', 'key' were unexpected)"
1852 )]
1853 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
1854 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(123),
1855 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Minimumrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Minimum#limit.: jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(456) },
1856 "value is less than the minimum of 456"
1857 )]
1858 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
1859 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!("secret_key_123"),
1860 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Patternrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Pattern# {
1861 patternrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Pattern#pattern.: "^[A-Z0-9]{32}$".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(),
1862 },
1863 "value does not match \"^[A-Z0-9]{32}$\""
1864 )]
1865 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
1866 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!([1, 2, 2, 3]),
1867 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::UniqueItemsrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#UniqueItems#,
1868 "value has non-unique elements"
1869 )]
1870 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
1871 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!(123),
1872 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type# { kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type#kind.: TypeKindrust-analyzer cargo jsonschema 0.37.4 error/TypeKind#::Singlerust-analyzer cargo jsonschema 0.37.4 error/TypeKind#Single#(JsonTyperust-analyzer cargo jsonschema 0.37.4 types/JsonType#::Stringrust-analyzer cargo jsonschema 0.37.4 types/JsonType#String#) },
1873 "value is not of type \"string\""
1874 )]
1875 fn test_masked_error_messagesrust-analyzer cargo jsonschema 0.37.4 error/tests/test_masked_error_messages().(instance: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#, kind: ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#, expected: &str) {
1876 let error =
1877 ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::newrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]new().(Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#::Ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#Owned#(instance), kind, Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().(), Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().());
1878 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(error.maskedrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]masked().().to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), expected);
1879 }
1880
1881 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
1882 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!("sensitive data"),
1883 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::MaxLengthrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength# { limitrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#MaxLength#limit.: 5 },
1884 "[REDACTED]",
1885 "[REDACTED] is longer than 5 characters"
1886 )]
1887 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
1888 jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!({"password": "secret123"}),
1889 ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#::Typerust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type# {
1890 kindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#Type#kind.: TypeKindrust-analyzer cargo jsonschema 0.37.4 error/TypeKind#::Singlerust-analyzer cargo jsonschema 0.37.4 error/TypeKind#Single#(JsonTyperust-analyzer cargo jsonschema 0.37.4 types/JsonType#::Stringrust-analyzer cargo jsonschema 0.37.4 types/JsonType#String#)
1891 },
1892 "***",
1893 "*** is not of type \"string\""
1894 )]
1895 fn test_custom_masked_error_messagesrust-analyzer cargo jsonschema 0.37.4 error/tests/test_custom_masked_error_messages().(
1896 instance: Valuerust-analyzer cargo serde_json 1.0.145 value/Value#,
1897 kind: ValidationErrorKindrust-analyzer cargo jsonschema 0.37.4 error/ValidationErrorKind#,
1898 placeholder: &str,
1899 expected: &str,
1900 ) {
1901 let error =
1902 ValidationErrorrust-analyzer cargo jsonschema 0.37.4 error/ValidationError#::newrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]new().(Cowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#::Ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/Cow#Owned#(instance), kind, Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().(), Locationrust-analyzer cargo jsonschema 0.37.4 paths/Location#::newrust-analyzer cargo jsonschema 0.37.4 paths/impl#[Location]new().());
1903 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(error.masked_withrust-analyzer cargo jsonschema 0.37.4 error/impl#[`ValidationError<'a>`]masked_with().(placeholder).to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), expected);
1904 }
1905 }