Debian Codegraph @

src/specification/draft6.rs

raw symbols SCIP
1 use serde_jsonrust-analyzer cargo serde_json 1.0.145 crate/::Valuerust-analyzer cargo serde_json 1.0.145 value/Value#;
2
3 use craterust-analyzer cargo referencing 0.37.4 crate/::{resourcerust-analyzer cargo referencing 0.37.4 resource/::InnerResourcePtrrust-analyzer cargo referencing 0.37.4 resource/InnerResourcePtr#, Errorrust-analyzer cargo referencing 0.37.4 error/Error#, Resolverrust-analyzer cargo referencing 0.37.4 resolver/Resolver#, Segmentsrust-analyzer cargo referencing 0.37.4 segments/Segments#};
4
5 use superrust-analyzer cargo referencing 0.37.4 specification/::subresourcesrust-analyzer cargo referencing 0.37.4 specification/subresources/::{selfrust-analyzer cargo referencing 0.37.4 specification/subresources/, SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#};
6
7 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn object_iterrust-analyzer cargo referencing 0.37.4 specification/draft6/object_iter().<'a>(
8 (key, value): (&'a Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, &'a Valuerust-analyzer cargo serde_json 1.0.145 value/Value#),
9 ) -> SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#<'a> {
10 match key.as_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]as_str().() {
11 "additionalItems" | "additionalProperties" | "contains" | "not" | "propertyNames" => {
12 SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#::Oncerust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#Once#(value)
13 }
14 "allOf" | "anyOf" | "oneOf" => {
15 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(arr) = value.as_arrayrust-analyzer cargo serde_json 1.0.145 value/impl#[Value]as_array().() {
16 SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#::Arrayrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#Array#(arr.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().())
17 } else {
18 SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#::Emptyrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#Empty#
19 }
20 }
21 "definitions" | "patternProperties" | "properties" => {
22 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(obj) = value.as_objectrust-analyzer cargo serde_json 1.0.145 value/impl#[Value]as_object().() {
23 SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#::Objectrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#Object#(obj.valuesrust-analyzer cargo serde_json 1.0.145 map/impl#[`Map<String, Value>`]values().())
24 } else {
25 SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#::Emptyrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#Empty#
26 }
27 }
28 "items" => match value {
29 Valuerust-analyzer cargo serde_json 1.0.145 value/Value#::Arrayrust-analyzer cargo serde_json 1.0.145 value/Value#Array#(arr) => SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#::Arrayrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#Array#(arr.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().()),
30 _ => SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#::Oncerust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#Once#(value),
31 },
32 "dependencies" => {
33 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(obj) = value.as_objectrust-analyzer cargo serde_json 1.0.145 value/impl#[Value]as_object().() {
34 SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#::FilteredObjectrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#FilteredObject#(obj.valuesrust-analyzer cargo serde_json 1.0.145 map/impl#[`Map<String, Value>`]values().())
35 } else {
36 SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#::Emptyrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#Empty#
37 }
38 }
39 _ => SubresourceIteratorInnerrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#::Emptyrust-analyzer cargo referencing 0.37.4 specification/subresources/SubresourceIteratorInner#Empty#,
40 }
41 }
42
43 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn maybe_in_subresourcerust-analyzer cargo referencing 0.37.4 specification/draft6/maybe_in_subresource().<'r>(
44 segments: &Segmentsrust-analyzer cargo referencing 0.37.4 segments/Segments#,
45 resolver: &Resolverrust-analyzer cargo referencing 0.37.4 resolver/Resolver#<'r>,
46 subresource: &InnerResourcePtrrust-analyzer cargo referencing 0.37.4 resource/InnerResourcePtr#,
47 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Resolverrust-analyzer cargo referencing 0.37.4 resolver/Resolver#<'r>, Errorrust-analyzer cargo referencing 0.37.4 error/Error#> {
48 const IN_VALUErust-analyzer cargo referencing 0.37.4 specification/draft6/IN_VALUE.: &[&str] = &[
49 "additionalItems",
50 "additionalProperties",
51 "contains",
52 "not",
53 "propertyNames",
54 ];
55 const IN_CHILDrust-analyzer cargo referencing 0.37.4 specification/draft6/IN_CHILD.: &[&str] = &[
56 "allOf",
57 "anyOf",
58 "oneOf",
59 "definitions",
60 "patternProperties",
61 "properties",
62 ];
63 subresourcesrust-analyzer cargo referencing 0.37.4 specification/subresources/::maybe_in_subresource_with_items_and_dependenciesrust-analyzer cargo referencing 0.37.4 specification/subresources/maybe_in_subresource_with_items_and_dependencies().(
64 segments,
65 resolver,
66 subresource,
67 IN_VALUErust-analyzer cargo referencing 0.37.4 specification/draft6/IN_VALUE.,
68 IN_CHILDrust-analyzer cargo referencing 0.37.4 specification/draft6/IN_CHILD.,
69 )
70 }