Debian Codegraph @

src/vocabularies.rs

raw symbols SCIP
1 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/;
2 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/::FromStrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/traits/FromStr#;
3
4 use craterust-analyzer cargo referencing 0.37.4 crate/::{urirust-analyzer cargo referencing 0.37.4 uri/, Errorrust-analyzer cargo referencing 0.37.4 error/Error#};
5 use ahashrust-analyzer cargo ahash 0.8.12 crate/::AHashSetrust-analyzer cargo ahash 0.8.12 hash_set/AHashSet#;
6 use fluent_urirust-analyzer cargo fluent-uri 0.4.1 crate/::Urirust-analyzer cargo fluent-uri 0.4.1 imp/Uri#;
7 use serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::Valuerust-analyzer cargo serde_json 1.0.145 value/Value#;
8
9 /// A JSON Schema vocabulary identifier, representing standard vocabularies (Core, Applicator, etc.)
10 /// or custom ones via URI.
11 #[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:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)]
12 pub enum Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary# {
13 Corerust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Core#,
14 Applicatorrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Applicator#,
15 Unevaluatedrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Unevaluated#,
16 Validationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Validation#,
17 Metadatarust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Metadata#,
18 Formatrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Format#,
19 FormatAnnotationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#FormatAnnotation#,
20 Contentrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Content#,
21 Customrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Custom#(Urirust-analyzer cargo fluent-uri 0.4.1 imp/Uri#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>),
22 }
23
24 impl FromStrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/traits/FromStr# for Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary# {
25 type Errrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[Vocabulary][FromStr]Err# = Errorrust-analyzer cargo referencing 0.37.4 error/Error#;
26
27 fn from_strrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[Vocabulary][FromStr]from_str().(s: &str) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[Vocabulary][FromStr], Selfrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[Vocabulary][FromStr]::Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/traits/FromStr#Err#> {
28 match s {
29 "https://json-schema.org/draft/2020-12/vocab/core"
30 | "https://json-schema.org/draft/2019-09/vocab/core" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Corerust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Core#),
31 "https://json-schema.org/draft/2020-12/vocab/applicator"
32 | "https://json-schema.org/draft/2019-09/vocab/applicator" => {
33 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Applicatorrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Applicator#)
34 }
35 "https://json-schema.org/draft/2020-12/vocab/unevaluated" => {
36 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Unevaluatedrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Unevaluated#)
37 }
38 "https://json-schema.org/draft/2020-12/vocab/validation"
39 | "https://json-schema.org/draft/2019-09/vocab/validation" => {
40 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Validationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Validation#)
41 }
42 "https://json-schema.org/draft/2020-12/vocab/meta-data"
43 | "https://json-schema.org/draft/2019-09/vocab/meta-data" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Metadatarust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Metadata#),
44 "https://json-schema.org/draft/2020-12/vocab/format"
45 | "https://json-schema.org/draft/2019-09/vocab/format" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Formatrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Format#),
46 "https://json-schema.org/draft/2020-12/vocab/format-annotation" => {
47 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::FormatAnnotationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#FormatAnnotation#)
48 }
49 "https://json-schema.org/draft/2020-12/vocab/content"
50 | "https://json-schema.org/draft/2019-09/vocab/content" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Contentrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Content#),
51 _ => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Customrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Custom#(urirust-analyzer cargo referencing 0.37.4 uri/::from_strrust-analyzer cargo referencing 0.37.4 uri/from_str().(s)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)),
52 }
53 }
54 }
55
56 /// A set of enabled JSON Schema vocabularies.
57 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:)]
58 pub struct VocabularySetrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet# {
59 knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known.: u8,
60 customrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#custom.: AHashSetrust-analyzer cargo ahash 0.8.12 hash_set/AHashSet#<Urirust-analyzer cargo fluent-uri 0.4.1 imp/Uri#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>,
61 }
62
63 impl fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug# for VocabularySetrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet# {
64 fn fmtrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet][Debug]fmt().(&self, f: &mut fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
65 let mut debug_list = f.debug_listrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]debug_list().();
66
67 // Add known vocabularies
68 if self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().0) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0 {
69 debug_list.entryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugList<'a, 'b>`]entry().(&"core");
70 }
71 if self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().1) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0 {
72 debug_list.entryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugList<'a, 'b>`]entry().(&"applicator");
73 }
74 if self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0 {
75 debug_list.entryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugList<'a, 'b>`]entry().(&"unevaluated");
76 }
77 if self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().3) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0 {
78 debug_list.entryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugList<'a, 'b>`]entry().(&"validation");
79 }
80 if self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().4) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0 {
81 debug_list.entryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugList<'a, 'b>`]entry().(&"meta-data");
82 }
83 if self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().5) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0 {
84 debug_list.entryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugList<'a, 'b>`]entry().(&"format");
85 }
86 if self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().6) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0 {
87 debug_list.entryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugList<'a, 'b>`]entry().(&"format-annotation");
88 }
89 if self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().7) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0 {
90 debug_list.entryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugList<'a, 'b>`]entry().(&"content");
91 }
92
93 // Add custom vocabularies
94 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.customrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#custom..is_emptyrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]is_empty().() {
95 let mut custom: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<_> = self.customrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#custom..iterrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(Urirust-analyzer cargo fluent-uri 0.4.1 imp/Uri#::as_strrust-analyzer cargo fluent-uri 0.4.1 imp/impl#[`Uri<T>`]as_str().).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().();
96 custom.sort_unstablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]sort_unstable().();
97 for uri in custom {
98 debug_list.entryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugList<'a, 'b>`]entry().(&uri);
99 }
100 }
101 debug_list.finishrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugList<'a, 'b>`]finish().()
102 }
103 }
104
105 impl VocabularySetrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet# {
106 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn newrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]new().() -> Selfrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet] {
107 Selfrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]::defaultrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet][Default]default().()
108 }
109
110 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn from_knownrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]from_known().(known: u8) -> Selfrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet] {
111 Selfrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet] {
112 knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known.,
113 customrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#custom.: AHashSetrust-analyzer cargo ahash 0.8.12 hash_set/AHashSet#::newrust-analyzer cargo ahash 0.8.12 hash_set/impl#[`AHashSet<T>`]new().(),
114 }
115 }
116
117 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(&mut self, vocabulary: Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#) {
118 match vocabulary {
119 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Corerust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Core# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().0,
120 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Applicatorrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Applicator# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().1,
121 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Unevaluatedrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Unevaluated# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().2,
122 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Validationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Validation# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().3,
123 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Metadatarust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Metadata# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().4,
124 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Formatrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Format# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().5,
125 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::FormatAnnotationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#FormatAnnotation# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().6,
126 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Contentrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Content# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitOrAssign<Self>`]bitor_assign().1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().7,
127 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Customrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Custom#(uri) => {
128 self.customrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#custom..insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]insert().(uri);
129 }
130 }
131 }
132 #[must_use]
133 pub fn containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&self, vocabulary: &Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#) -> bool {
134 match vocabulary {
135 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Corerust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Core# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().0) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0,
136 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Applicatorrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Applicator# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().1) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0,
137 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Unevaluatedrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Unevaluated# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0,
138 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Validationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Validation# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().3) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0,
139 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Metadatarust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Metadata# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().4) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0,
140 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Formatrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Format# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().5) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0,
141 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::FormatAnnotationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#FormatAnnotation# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().6) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0,
142 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Contentrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Content# => self.knownrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#known. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`BitAnd<Self>`]bitand().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u8][`Shl<i32>`]shl().7) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().0,
143 Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Customrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Custom#(uri) => self.customrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#custom..containsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/set/impl#[`HashSet<T, S, A>`]contains().(uri),
144 }
145 }
146 }
147
148 pub(craterust-analyzer cargo referencing 0.37.4 crate/) const DRAFT_2020_12_VOCABULARIESrust-analyzer cargo referencing 0.37.4 vocabularies/DRAFT_2020_12_VOCABULARIES.: u8 = 0b1111_1111;
149 pub(craterust-analyzer cargo referencing 0.37.4 crate/) const DRAFT_2019_09_VOCABULARIESrust-analyzer cargo referencing 0.37.4 vocabularies/DRAFT_2019_09_VOCABULARIES.: u8 = 0b1001_1011;
150
151 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn findrust-analyzer cargo referencing 0.37.4 vocabularies/find().(document: &Valuerust-analyzer cargo serde_json 1.0.145 value/Value#) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<VocabularySetrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#>, Errorrust-analyzer cargo referencing 0.37.4 error/Error#> {
152 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(schema) = document.getrust-analyzer cargo serde_json 1.0.145 value/impl#[Value]get().("$id").and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]and_then().(|s| s.as_strrust-analyzer cargo serde_json 1.0.145 value/impl#[Value]as_str().()) {
153 match schema {
154 "https://json-schema.org/schema" | "https://json-schema.org/draft/2020-12/schema" => {
155 // All known vocabularies
156 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(VocabularySetrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#::from_knownrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]from_known().(DRAFT_2020_12_VOCABULARIESrust-analyzer cargo referencing 0.37.4 vocabularies/DRAFT_2020_12_VOCABULARIES.)))
157 }
158 "https://json-schema.org/draft/2019-09/schema" => {
159 // Core, Applicator, Validation, Metadata, Content
160 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(VocabularySetrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#::from_knownrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]from_known().(DRAFT_2019_09_VOCABULARIESrust-analyzer cargo referencing 0.37.4 vocabularies/DRAFT_2019_09_VOCABULARIES.)))
161 }
162 "https://json-schema.org/draft-07/schema"
163 | "https://json-schema.org/draft-06/schema"
164 | "https://json-schema.org/draft-04/schema" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
165 _ => {
166 // For unknown schemas, parse the $vocabulary object
167 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(vocab_obj) = document.getrust-analyzer cargo serde_json 1.0.145 value/impl#[Value]get().("$vocabulary").and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]and_then().(|v| v.as_objectrust-analyzer cargo serde_json 1.0.145 value/impl#[Value]as_object().()) {
168 let mut set = VocabularySetrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#::newrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]new().();
169 for (uri, enabled) in vocab_obj {
170 if enabled.as_boolrust-analyzer cargo serde_json 1.0.145 value/impl#[Value]as_bool().().unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(false) {
171 set.addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::from_strrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[Vocabulary][FromStr]from_str().(uri)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().);
172 }
173 }
174 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(set))
175 } else {
176 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#)
177 }
178 }
179 }
180 } else {
181 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#)
182 }
183 }
184
185 #[cfg(test)]
186 mod testsrust-analyzer cargo referencing 0.37.4 vocabularies/tests/ {
187 use superrust-analyzer cargo referencing 0.37.4 vocabularies/::*;
188 use test_caserust-analyzer cargo test-case 3.3.1 crate/::test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:;
189
190 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Corerust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Core#, 0b0000_0001, true)]
191 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Applicatorrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Applicator#, 0b0000_0010, true)]
192 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Unevaluatedrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Unevaluated#, 0b0000_0100, true)]
193 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Validationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Validation#, 0b0000_1000, true)]
194 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Metadatarust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Metadata#, 0b0001_0000, true)]
195 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Formatrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Format#, 0b0010_0000, true)]
196 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::FormatAnnotationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#FormatAnnotation#, 0b0100_0000, true)]
197 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Contentrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Content#, 0b1000_0000, true)]
198 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Corerust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Core#, 0b1111_1110, false)]
199 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Applicatorrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Applicator#, 0b1111_1101, false)]
200 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Unevaluatedrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Unevaluated#, 0b111_11011, false)]
201 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Validationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Validation#, 0b1111_0111, false)]
202 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Metadatarust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Metadata#, 0b1110_1111, false)]
203 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Formatrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Format#, 0b1101_1111, false)]
204 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::FormatAnnotationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#FormatAnnotation#, 0b1011_1111, false)]
205 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Contentrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Content#, 0b0111_1111, false)]
206 fn test_vocabulary_setrust-analyzer cargo referencing 0.37.4 vocabularies/tests/test_vocabulary_set().(vocabulary: &Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#, known: u8, expected: bool) {
207 let set = VocabularySetrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#::from_knownrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]from_known().(known);
208 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(vocabulary), expected);
209 }
210
211 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
212 fn test_vocabulary_set_add_and_containsrust-analyzer cargo referencing 0.37.4 vocabularies/tests/test_vocabulary_set_add_and_contains().() {
213 let mut set = VocabularySetrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#::newrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]new().();
214
215 set.addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Corerust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Core#);
216 set.addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Applicatorrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Applicator#);
217 set.addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Validationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Validation#);
218 set.addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Metadatarust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Metadata#);
219 set.addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Contentrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Content#);
220
221 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Corerust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Core#));
222 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Applicatorrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Applicator#));
223 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Validationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Validation#));
224 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Metadatarust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Metadata#));
225 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Contentrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Content#));
226
227 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().set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Unevaluatedrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Unevaluated#));
228 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().set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Formatrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Format#));
229 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().set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::FormatAnnotationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#FormatAnnotation#));
230
231 set.addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Unevaluatedrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Unevaluated#);
232 set.addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Formatrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Format#);
233 set.addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::FormatAnnotationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#FormatAnnotation#);
234
235 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Unevaluatedrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Unevaluated#));
236 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Formatrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Format#));
237 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::FormatAnnotationrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#FormatAnnotation#));
238 }
239
240 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
241 fn test_vocabulary_set_debugrust-analyzer cargo referencing 0.37.4 vocabularies/tests/test_vocabulary_set_debug().() {
242 let mut set = VocabularySetrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#::from_knownrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]from_known().(0b0001_1111); // Core, Applicator, Unevaluated, Validation, Metadata
243 set.addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Customrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Custom#(
244 urirust-analyzer cargo referencing 0.37.4 uri/::from_strrust-analyzer cargo referencing 0.37.4 uri/from_str().("https://example.com/custom-vocab").unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
245 ));
246
247 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
248 formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{set:?}"),
249 "[\"core\", \"applicator\", \"unevaluated\", \"validation\", \"meta-data\", \"https://example.com/custom-vocab\"]"
250 );
251 }
252
253 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
254 fn test_custom_vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/tests/test_custom_vocabulary().() {
255 let custom_uri = urirust-analyzer cargo referencing 0.37.4 uri/::from_strrust-analyzer cargo referencing 0.37.4 uri/from_str().("https://example.com/custom-vocab").expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("Invalid URI");
256 let mut set = VocabularySetrust-analyzer cargo referencing 0.37.4 vocabularies/VocabularySet#::newrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]new().();
257 set.addrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]add().(Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Customrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Custom#(custom_uri.clonerust-analyzer cargo fluent-uri 0.4.1 imp/impl#[`Uri<T>`][Clone]clone().()));
258
259 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Customrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Custom#(custom_uri)));
260 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().set.containsrust-analyzer cargo referencing 0.37.4 vocabularies/impl#[VocabularySet]contains().(&Vocabularyrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#::Customrust-analyzer cargo referencing 0.37.4 vocabularies/Vocabulary#Custom#(
261 urirust-analyzer cargo referencing 0.37.4 uri/::from_strrust-analyzer cargo referencing 0.37.4 uri/from_str().("https://example.com/other-vocab").expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("Invalid URI")
262 )));
263 }
264
265 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
266 &serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!({"$id": "https://json-schema.org/draft/2020-12/schema"}),
267 "Some([\"core\", \"applicator\", \"unevaluated\", \"validation\", \"meta-data\", \"format\", \"format-annotation\", \"content\"])"
268 ; "2020-12 draft"
269 )]
270 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
271 &serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!({"$id": "https://json-schema.org/draft/2019-09/schema"}),
272 "Some([\"core\", \"applicator\", \"validation\", \"meta-data\", \"content\"])"
273 ; "2019-09 draft"
274 )]
275 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
276 &serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!({"$id": "https://json-schema.org/draft-07/schema"}),
277 "None"
278 ; "draft-07"
279 )]
280 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
281 &serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!({
282 "$id": "https://example.com/custom-schema",
283 "$vocabulary": {
284 "https://example.com/custom-vocab1": true,
285 "https://example.com/custom-vocab2": true,
286 "https://example.com/custom-vocab3": false,
287 }
288 }),
289 "Some([\"https://example.com/custom-vocab1\", \"https://example.com/custom-vocab2\"])"
290 ; "custom schema"
291 )]
292 #[test_caserust-analyzer cargo test-case-macros 3.3.1 test_case:(
293 &serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::jsonrust-analyzer cargo serde_json 1.0.145 macros/json!!({}),
294 "None"
295 ; "no $id keyword"
296 )]
297 fn test_findrust-analyzer cargo referencing 0.37.4 vocabularies/tests/test_find().(schema: &serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::Valuerust-analyzer cargo serde_json 1.0.145 value/Value#, expected: &str) {
298 let set = findrust-analyzer cargo referencing 0.37.4 vocabularies/find().(schema).expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("Invalid vocabulary");
299 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!!("{set:?}"), expected);
300 }
301 }