Debian Codegraph @

src/error.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/::{numrust-analyzer cargo std https://github.com/rust-lang/rust/library/std num/::ParseIntErrorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/error/ParseIntError#, strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/::Utf8Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/error/Utf8Error#};
3
4 use fluent_urirust-analyzer cargo fluent-uri 0.4.1 crate/::{resolverust-analyzer cargo fluent-uri 0.4.1 resolve/::ResolveErrorrust-analyzer cargo fluent-uri 0.4.1 resolve/ResolveError#, ParseErrorrust-analyzer cargo fluent-uri 0.4.1 parse/ParseError#, Urirust-analyzer cargo fluent-uri 0.4.1 imp/Uri#};
5
6 /// Errors that can occur during reference resolution and resource handling.
7 #[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:)]
8 pub enum Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
9 /// A resource is not present in a registry and retrieving it failed.
10 Unretrievablerust-analyzer cargo referencing 0.37.4 error/Error#Unretrievable# {
11 urirust-analyzer cargo referencing 0.37.4 error/Error#Unretrievable#uri.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#,
12 sourcerust-analyzer cargo referencing 0.37.4 error/Error#Unretrievable#source.: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::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# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#>,
13 },
14 /// A JSON Pointer leads to a part of a document that does not exist.
15 PointerToNowhererust-analyzer cargo referencing 0.37.4 error/Error#PointerToNowhere# { pointerrust-analyzer cargo referencing 0.37.4 error/Error#PointerToNowhere#pointer.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# },
16 /// JSON Pointer contains invalid percent-encoded data.
17 InvalidPercentEncodingrust-analyzer cargo referencing 0.37.4 error/Error#InvalidPercentEncoding# { pointerrust-analyzer cargo referencing 0.37.4 error/Error#InvalidPercentEncoding#pointer.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, sourcerust-analyzer cargo referencing 0.37.4 error/Error#InvalidPercentEncoding#source.: Utf8Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/error/Utf8Error# },
18 /// Failed to parse array index in JSON Pointer.
19 InvalidArrayIndexrust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex# {
20 pointerrust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex#pointer.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#,
21 indexrust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex#index.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#,
22 sourcerust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex#source.: ParseIntErrorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/error/ParseIntError#,
23 },
24 /// An anchor does not exist within a particular resource.
25 NoSuchAnchorrust-analyzer cargo referencing 0.37.4 error/Error#NoSuchAnchor# { anchorrust-analyzer cargo referencing 0.37.4 error/Error#NoSuchAnchor#anchor.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# },
26 /// An anchor which could never exist in a resource was dereferenced.
27 InvalidAnchorrust-analyzer cargo referencing 0.37.4 error/Error#InvalidAnchor# { anchorrust-analyzer cargo referencing 0.37.4 error/Error#InvalidAnchor#anchor.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# },
28 /// An error occurred while parsing or manipulating a URI.
29 InvalidUrirust-analyzer cargo referencing 0.37.4 error/Error#InvalidUri#(UriErrorrust-analyzer cargo referencing 0.37.4 error/UriError#),
30 /// An unknown JSON Schema specification was encountered.
31 UnknownSpecificationrust-analyzer cargo referencing 0.37.4 error/Error#UnknownSpecification# { specificationrust-analyzer cargo referencing 0.37.4 error/Error#UnknownSpecification#specification.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# },
32 /// A circular reference was detected in a meta-schema chain.
33 CircularMetaschemarust-analyzer cargo referencing 0.37.4 error/Error#CircularMetaschema# { urirust-analyzer cargo referencing 0.37.4 error/Error#CircularMetaschema#uri.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# },
34 }
35
36 impl Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
37 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn pointer_to_nowhererust-analyzer cargo referencing 0.37.4 error/impl#[Error]pointer_to_nowhere().(pointer: 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#>) -> Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
38 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::PointerToNowhererust-analyzer cargo referencing 0.37.4 error/Error#PointerToNowhere# {
39 pointerrust-analyzer cargo referencing 0.37.4 error/Error#PointerToNowhere#pointer.: pointer.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
40 }
41 }
42 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn invalid_percent_encodingrust-analyzer cargo referencing 0.37.4 error/impl#[Error]invalid_percent_encoding().(pointer: 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#>, source: Utf8Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/error/Utf8Error#) -> Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
43 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidPercentEncodingrust-analyzer cargo referencing 0.37.4 error/Error#InvalidPercentEncoding# {
44 pointerrust-analyzer cargo referencing 0.37.4 error/Error#InvalidPercentEncoding#pointer.: pointer.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
45 sourcerust-analyzer cargo referencing 0.37.4 error/Error#InvalidPercentEncoding#source.,
46 }
47 }
48 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn invalid_array_indexrust-analyzer cargo referencing 0.37.4 error/impl#[Error]invalid_array_index().(
49 pointer: 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#>,
50 index: 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#>,
51 source: ParseIntErrorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/error/ParseIntError#,
52 ) -> Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
53 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidArrayIndexrust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex# {
54 pointerrust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex#pointer.: pointer.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
55 indexrust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex#index.: index.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
56 sourcerust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex#source.,
57 }
58 }
59 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn invalid_anchorrust-analyzer cargo referencing 0.37.4 error/impl#[Error]invalid_anchor().(anchor: 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#>) -> Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
60 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidAnchorrust-analyzer cargo referencing 0.37.4 error/Error#InvalidAnchor# {
61 anchorrust-analyzer cargo referencing 0.37.4 error/Error#InvalidAnchor#anchor.: anchor.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
62 }
63 }
64 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn no_such_anchorrust-analyzer cargo referencing 0.37.4 error/impl#[Error]no_such_anchor().(anchor: 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#>) -> Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
65 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::NoSuchAnchorrust-analyzer cargo referencing 0.37.4 error/Error#NoSuchAnchor# {
66 anchorrust-analyzer cargo referencing 0.37.4 error/Error#NoSuchAnchor#anchor.: anchor.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
67 }
68 }
69
70 pub fn unknown_specificationrust-analyzer cargo referencing 0.37.4 error/impl#[Error]unknown_specification().(specification: 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#>) -> Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
71 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::UnknownSpecificationrust-analyzer cargo referencing 0.37.4 error/Error#UnknownSpecification# {
72 specificationrust-analyzer cargo referencing 0.37.4 error/Error#UnknownSpecification#specification.: specification.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
73 }
74 }
75
76 pub fn circular_metaschemarust-analyzer cargo referencing 0.37.4 error/impl#[Error]circular_metaschema().(uri: 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#>) -> Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
77 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::CircularMetaschemarust-analyzer cargo referencing 0.37.4 error/Error#CircularMetaschema# { urirust-analyzer cargo referencing 0.37.4 error/Error#CircularMetaschema#uri.: uri.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().() }
78 }
79
80 pub fn unretrievablerust-analyzer cargo referencing 0.37.4 error/impl#[Error]unretrievable().(
81 uri: 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#>,
82 source: Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#<dyn stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::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# + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send# + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#>,
83 ) -> Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
84 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::Unretrievablerust-analyzer cargo referencing 0.37.4 error/Error#Unretrievable# {
85 urirust-analyzer cargo referencing 0.37.4 error/Error#Unretrievable#uri.: uri.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
86 sourcerust-analyzer cargo referencing 0.37.4 error/Error#Unretrievable#source.,
87 }
88 }
89
90 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn uri_parsing_errorrust-analyzer cargo referencing 0.37.4 error/impl#[Error]uri_parsing_error().(uri: 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#>, error: ParseErrorrust-analyzer cargo fluent-uri 0.4.1 parse/ParseError#) -> Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
91 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidUrirust-analyzer cargo referencing 0.37.4 error/Error#InvalidUri#(UriErrorrust-analyzer cargo referencing 0.37.4 error/UriError#::Parserust-analyzer cargo referencing 0.37.4 error/UriError#Parse# {
92 urirust-analyzer cargo referencing 0.37.4 error/UriError#Parse#uri.: uri.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
93 is_referencerust-analyzer cargo referencing 0.37.4 error/UriError#Parse#is_reference.: false,
94 errorrust-analyzer cargo referencing 0.37.4 error/UriError#Parse#error.,
95 })
96 }
97
98 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn uri_reference_parsing_errorrust-analyzer cargo referencing 0.37.4 error/impl#[Error]uri_reference_parsing_error().(uri: 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#>, error: ParseErrorrust-analyzer cargo fluent-uri 0.4.1 parse/ParseError#) -> Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
99 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidUrirust-analyzer cargo referencing 0.37.4 error/Error#InvalidUri#(UriErrorrust-analyzer cargo referencing 0.37.4 error/UriError#::Parserust-analyzer cargo referencing 0.37.4 error/UriError#Parse# {
100 urirust-analyzer cargo referencing 0.37.4 error/UriError#Parse#uri.: uri.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
101 is_referencerust-analyzer cargo referencing 0.37.4 error/UriError#Parse#is_reference.: true,
102 errorrust-analyzer cargo referencing 0.37.4 error/UriError#Parse#error.,
103 })
104 }
105
106 pub(craterust-analyzer cargo referencing 0.37.4 crate/) fn uri_resolving_errorrust-analyzer cargo referencing 0.37.4 error/impl#[Error]uri_resolving_error().(
107 uri: 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#>,
108 base: Urirust-analyzer cargo fluent-uri 0.4.1 imp/Uri#<&str>,
109 error: ResolveErrorrust-analyzer cargo fluent-uri 0.4.1 resolve/ResolveError#,
110 ) -> Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
111 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidUrirust-analyzer cargo referencing 0.37.4 error/Error#InvalidUri#(UriErrorrust-analyzer cargo referencing 0.37.4 error/UriError#::Resolverust-analyzer cargo referencing 0.37.4 error/UriError#Resolve# {
112 urirust-analyzer cargo referencing 0.37.4 error/UriError#Resolve#uri.: uri.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/Into#into().(),
113 baserust-analyzer cargo referencing 0.37.4 error/UriError#Resolve#base.: base.to_ownedrust-analyzer cargo fluent-uri 0.4.1 imp/impl#[`Uri<&str>`]to_owned().(),
114 errorrust-analyzer cargo referencing 0.37.4 error/UriError#Resolve#error.,
115 })
116 }
117 }
118
119 impl fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
120 fn fmtrust-analyzer cargo referencing 0.37.4 error/impl#[Error][Display]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# {
121 match self {
122 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::Unretrievablerust-analyzer cargo referencing 0.37.4 error/Error#Unretrievable# { urirust-analyzer cargo referencing 0.37.4 error/Error#Unretrievable#uri., sourcerust-analyzer cargo referencing 0.37.4 error/Error#Unretrievable#source. } => {
123 f.write_fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_fmt().(format_argsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/format_args!!("Resource '{uri}' is not present in a registry and retrieving it failed: {source}"))
124 },
125 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::PointerToNowhererust-analyzer cargo referencing 0.37.4 error/Error#PointerToNowhere# { pointerrust-analyzer cargo referencing 0.37.4 error/Error#PointerToNowhere#pointer. } => {
126 f.write_fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_fmt().(format_argsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/format_args!!("Pointer '{pointer}' does not exist"))
127 }
128 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidPercentEncodingrust-analyzer cargo referencing 0.37.4 error/Error#InvalidPercentEncoding# { pointerrust-analyzer cargo referencing 0.37.4 error/Error#InvalidPercentEncoding#pointer., .. } => {
129 f.write_fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_fmt().(format_argsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/format_args!!("Invalid percent encoding in pointer '{pointer}': the decoded bytes do not represent valid UTF-8"))
130 }
131 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidArrayIndexrust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex# { pointerrust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex#pointer., indexrust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex#index., .. } => {
132 f.write_fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_fmt().(format_argsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/format_args!!("Failed to parse array index '{index}' in pointer '{pointer}'"))
133 }
134 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::NoSuchAnchorrust-analyzer cargo referencing 0.37.4 error/Error#NoSuchAnchor# { anchorrust-analyzer cargo referencing 0.37.4 error/Error#NoSuchAnchor#anchor. } => {
135 f.write_fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_fmt().(format_argsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/format_args!!("Anchor '{anchor}' does not exist"))
136 }
137 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidAnchorrust-analyzer cargo referencing 0.37.4 error/Error#InvalidAnchor# { anchorrust-analyzer cargo referencing 0.37.4 error/Error#InvalidAnchor#anchor. } => {
138 f.write_fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_fmt().(format_argsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/format_args!!("Anchor '{anchor}' is invalid"))
139 }
140 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidUrirust-analyzer cargo referencing 0.37.4 error/Error#InvalidUri#(error) => error.fmtrust-analyzer cargo referencing 0.37.4 error/impl#[UriError][Display]fmt().(f),
141 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::UnknownSpecificationrust-analyzer cargo referencing 0.37.4 error/Error#UnknownSpecification# { specificationrust-analyzer cargo referencing 0.37.4 error/Error#UnknownSpecification#specification. } => {
142 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "Unknown meta-schema: '{specification}'. Custom meta-schemas must be registered in the registry before use")
143 }
144 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::CircularMetaschemarust-analyzer cargo referencing 0.37.4 error/Error#CircularMetaschema# { urirust-analyzer cargo referencing 0.37.4 error/Error#CircularMetaschema#uri. } => {
145 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "Circular meta-schema reference detected at '{uri}'")
146 }
147 }
148 }
149 }
150
151 impl stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::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 Errorrust-analyzer cargo referencing 0.37.4 error/Error# {
152 fn sourcerust-analyzer cargo referencing 0.37.4 error/impl#[Error][Error]source().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&(dyn stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::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# + 'static)> {
153 match self {
154 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::Unretrievablerust-analyzer cargo referencing 0.37.4 error/Error#Unretrievable# { sourcerust-analyzer cargo referencing 0.37.4 error/Error#Unretrievable#source., .. } => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(&*rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T, A>`][Deref]deref().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().source),
155 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidUrirust-analyzer cargo referencing 0.37.4 error/Error#InvalidUri#(error) => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(error),
156 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidPercentEncodingrust-analyzer cargo referencing 0.37.4 error/Error#InvalidPercentEncoding# { sourcerust-analyzer cargo referencing 0.37.4 error/Error#InvalidPercentEncoding#source., .. } => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(source),
157 Errorrust-analyzer cargo referencing 0.37.4 error/Error#::InvalidArrayIndexrust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex# { sourcerust-analyzer cargo referencing 0.37.4 error/Error#InvalidArrayIndex#source., .. } => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(source),
158 _ => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
159 }
160 }
161 }
162
163 /// Errors that can occur during URI handling.
164 #[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:)]
165 pub enum UriErrorrust-analyzer cargo referencing 0.37.4 error/UriError# {
166 Parserust-analyzer cargo referencing 0.37.4 error/UriError#Parse# {
167 urirust-analyzer cargo referencing 0.37.4 error/UriError#Parse#uri.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#,
168 is_referencerust-analyzer cargo referencing 0.37.4 error/UriError#Parse#is_reference.: bool,
169 errorrust-analyzer cargo referencing 0.37.4 error/UriError#Parse#error.: ParseErrorrust-analyzer cargo fluent-uri 0.4.1 parse/ParseError#,
170 },
171 Resolverust-analyzer cargo referencing 0.37.4 error/UriError#Resolve# {
172 urirust-analyzer cargo referencing 0.37.4 error/UriError#Resolve#uri.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#,
173 baserust-analyzer cargo referencing 0.37.4 error/UriError#Resolve#base.: Urirust-analyzer cargo fluent-uri 0.4.1 imp/Uri#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>,
174 errorrust-analyzer cargo referencing 0.37.4 error/UriError#Resolve#error.: ResolveErrorrust-analyzer cargo fluent-uri 0.4.1 resolve/ResolveError#,
175 },
176 }
177
178 impl fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for UriErrorrust-analyzer cargo referencing 0.37.4 error/UriError# {
179 fn fmtrust-analyzer cargo referencing 0.37.4 error/impl#[UriError][Display]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# {
180 match self {
181 UriErrorrust-analyzer cargo referencing 0.37.4 error/UriError#::Parserust-analyzer cargo referencing 0.37.4 error/UriError#Parse# {
182 urirust-analyzer cargo referencing 0.37.4 error/UriError#Parse#uri.,
183 is_referencerust-analyzer cargo referencing 0.37.4 error/UriError#Parse#is_reference.,
184 errorrust-analyzer cargo referencing 0.37.4 error/UriError#Parse#error.,
185 } => {
186 if *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().is_reference {
187 f.write_fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_fmt().(format_argsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/format_args!!("Invalid URI reference '{uri}': {error}"))
188 } else {
189 f.write_fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_fmt().(format_argsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/format_args!!("Invalid URI '{uri}': {error}"))
190 }
191 }
192 UriErrorrust-analyzer cargo referencing 0.37.4 error/UriError#::Resolverust-analyzer cargo referencing 0.37.4 error/UriError#Resolve# { urirust-analyzer cargo referencing 0.37.4 error/UriError#Resolve#uri., baserust-analyzer cargo referencing 0.37.4 error/UriError#Resolve#base., errorrust-analyzer cargo referencing 0.37.4 error/UriError#Resolve#error. } => f.write_fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_fmt().(format_argsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/format_args!!(
193 "Failed to resolve '{uri}' against '{base}': {error}"
194 )),
195 }
196 }
197 }
198
199 impl stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::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 UriErrorrust-analyzer cargo referencing 0.37.4 error/UriError# {
200 fn sourcerust-analyzer cargo referencing 0.37.4 error/impl#[UriError][Error]source().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&(dyn stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::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# + 'static)> {
201 match self {
202 UriErrorrust-analyzer cargo referencing 0.37.4 error/UriError#::Parserust-analyzer cargo referencing 0.37.4 error/UriError#Parse# { errorrust-analyzer cargo referencing 0.37.4 error/UriError#Parse#error., .. } => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(error),
203 UriErrorrust-analyzer cargo referencing 0.37.4 error/UriError#::Resolverust-analyzer cargo referencing 0.37.4 error/UriError#Resolve# { errorrust-analyzer cargo referencing 0.37.4 error/UriError#Resolve#error., .. } => Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(error),
204 }
205 }
206 }