| 1 | use craterust-analyzer cargo fluent-uri 0.4.1 crate/::{ |
| 2 | componentrust-analyzer cargo fluent-uri 0.4.1 component/::{Authorityrust-analyzer cargo fluent-uri 0.4.1 component/Authority#, Hostrust-analyzer cargo fluent-uri 0.4.1 component/Host#, Schemerust-analyzer cargo fluent-uri 0.4.1 component/Scheme#}, |
| 3 | parserust-analyzer cargo fluent-uri 0.4.1 parse/::{ParseErrorrust-analyzer cargo fluent-uri 0.4.1 parse/ParseError#, ParseErrorKindrust-analyzer cargo fluent-uri 0.4.1 parse/ParseErrorKind#}, |
| 4 | pct_encrust-analyzer cargo fluent-uri 0.4.1 pct_enc/::{EStrrust-analyzer cargo fluent-uri 0.4.1 pct_enc/EStr#, Encoderrust-analyzer cargo fluent-uri 0.4.1 pct_enc/Encoder#}, |
| 5 | ConvertErrorrust-analyzer cargo fluent-uri 0.4.1 convert/ConvertError#, |
| 6 | }; |
| 7 | 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/::{Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug#, Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#, Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result#}; |
| 8 | |
| 9 | impl<E: Encoderrust-analyzer cargo fluent-uri 0.4.1 pct_enc/Encoder#> Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug# for EStrrust-analyzer cargo fluent-uri 0.4.1 pct_enc/EStr#<E> { |
| 10 | fn fmtrust-analyzer cargo fluent-uri 0.4.1 fmt/impl#[`EStr<E>`][Debug]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 11 | Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug#::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[str][Debug]fmt().(self.as_strrust-analyzer cargo fluent-uri 0.4.1 pct_enc/impl#[`EStr<E>`]as_str().(), f) |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | impl<E: Encoderrust-analyzer cargo fluent-uri 0.4.1 pct_enc/Encoder#> Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for EStrrust-analyzer cargo fluent-uri 0.4.1 pct_enc/EStr#<E> { |
| 16 | fn fmtrust-analyzer cargo fluent-uri 0.4.1 fmt/impl#[`EStr<E>`][Display]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 17 | Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[str][Display]fmt().(self.as_strrust-analyzer cargo fluent-uri 0.4.1 pct_enc/impl#[`EStr<E>`]as_str().(), f) |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | impl Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for ParseErrorrust-analyzer cargo fluent-uri 0.4.1 parse/ParseError# { |
| 22 | fn fmtrust-analyzer cargo fluent-uri 0.4.1 fmt/impl#[ParseError][Display]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 23 | let msg = match self.kindrust-analyzer cargo fluent-uri 0.4.1 parse/ParseError#kind. { |
| 24 | ParseErrorKindrust-analyzer cargo fluent-uri 0.4.1 parse/ParseErrorKind#::InvalidPctEncodedOctetrust-analyzer cargo fluent-uri 0.4.1 parse/ParseErrorKind#InvalidPctEncodedOctet# => "invalid percent-encoded octet at index ", |
| 25 | ParseErrorKindrust-analyzer cargo fluent-uri 0.4.1 parse/ParseErrorKind#::UnexpectedCharrust-analyzer cargo fluent-uri 0.4.1 parse/ParseErrorKind#UnexpectedChar# => "unexpected character at index ", |
| 26 | ParseErrorKindrust-analyzer cargo fluent-uri 0.4.1 parse/ParseErrorKind#::InvalidIpv6Addrrust-analyzer cargo fluent-uri 0.4.1 parse/ParseErrorKind#InvalidIpv6Addr# => "invalid IPv6 address at index ", |
| 27 | }; |
| 28 | writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{}{}", msg, self.indexrust-analyzer cargo fluent-uri 0.4.1 parse/ParseError#index.) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | impl Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for ConvertErrorrust-analyzer cargo fluent-uri 0.4.1 convert/ConvertError# { |
| 33 | fn fmtrust-analyzer cargo fluent-uri 0.4.1 fmt/impl#[ConvertError][Display]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 34 | match self { |
| 35 | Selfrust-analyzer cargo fluent-uri 0.4.1 fmt/impl#[ConvertError][Display]::NotAsciirust-analyzer cargo fluent-uri 0.4.1 convert/ConvertError#NotAscii# { indexrust-analyzer cargo fluent-uri 0.4.1 convert/ConvertError#NotAscii#index. } => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "non-ASCII character at index {index}"), |
| 36 | Selfrust-analyzer cargo fluent-uri 0.4.1 fmt/impl#[ConvertError][Display]::NoSchemerust-analyzer cargo fluent-uri 0.4.1 convert/ConvertError#NoScheme# => f.write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]write_str().("scheme not present"), |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | impl Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug# for Schemerust-analyzer cargo fluent-uri 0.4.1 component/Scheme# { |
| 42 | #[inline] |
| 43 | fn fmtrust-analyzer cargo fluent-uri 0.4.1 fmt/impl#[Scheme][Debug]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 44 | Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug#::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[str][Debug]fmt().(self.as_strrust-analyzer cargo fluent-uri 0.4.1 component/impl#[Scheme]as_str().(), f) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | impl Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for Schemerust-analyzer cargo fluent-uri 0.4.1 component/Scheme# { |
| 49 | #[inline] |
| 50 | fn fmtrust-analyzer cargo fluent-uri 0.4.1 fmt/impl#[Scheme][Display]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 51 | Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[str][Display]fmt().(self.as_strrust-analyzer cargo fluent-uri 0.4.1 component/impl#[Scheme]as_str().(), f) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | impl<RegNameE: Encoderrust-analyzer cargo fluent-uri 0.4.1 pct_enc/Encoder#> Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug# for Hostrust-analyzer cargo fluent-uri 0.4.1 component/Host#<'_, RegNameE> { |
| 56 | fn fmtrust-analyzer cargo fluent-uri 0.4.1 fmt/impl#[`Host<'_, RegNameE>`][Debug]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 57 | match self { |
| 58 | #[cfg(feature = "net")] |
| 59 | Hostrust-analyzer cargo fluent-uri 0.4.1 component/Host#::Ipv4rust-analyzer cargo fluent-uri 0.4.1 component/Host#Ipv4#(addr) => f.debug_tuplerust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]debug_tuple().("Ipv4").fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugTuple<'a, 'b>`]field().(addr).finishrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugTuple<'a, 'b>`]finish().(), |
| 60 | #[cfg(feature = "net")] |
| 61 | Hostrust-analyzer cargo fluent-uri 0.4.1 component/Host#::Ipv6rust-analyzer cargo fluent-uri 0.4.1 component/Host#Ipv6#(addr) => f.debug_tuplerust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]debug_tuple().("Ipv6").fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugTuple<'a, 'b>`]field().(addr).finishrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugTuple<'a, 'b>`]finish().(), |
| 62 | |
| 63 | #[cfg(not(feature = "net"))] |
| 64 | Hostrust-analyzer cargo fluent-uri 0.4.1 component/Host#::Ipv4rust-analyzer cargo fluent-uri 0.4.1 component/Host#Ipv4#() => f.debug_struct("Ipv4").finish_non_exhaustive(), |
| 65 | #[cfg(not(feature = "net"))] |
| 66 | Hostrust-analyzer cargo fluent-uri 0.4.1 component/Host#::Ipv6rust-analyzer cargo fluent-uri 0.4.1 component/Host#Ipv6#() => f.debug_struct("Ipv6").finish_non_exhaustive(), |
| 67 | |
| 68 | Hostrust-analyzer cargo fluent-uri 0.4.1 component/Host#::IpvFuturerust-analyzer cargo fluent-uri 0.4.1 component/Host#IpvFuture# => f.debug_structrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]debug_struct().("IpvFuture").finish_non_exhaustiverust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]finish_non_exhaustive().(), |
| 69 | Hostrust-analyzer cargo fluent-uri 0.4.1 component/Host#::RegNamerust-analyzer cargo fluent-uri 0.4.1 component/Host#RegName#(name) => f.debug_tuplerust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]debug_tuple().("RegName").fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugTuple<'a, 'b>`]field().(name).finishrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugTuple<'a, 'b>`]finish().(), |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | impl<UserinfoE: Encoderrust-analyzer cargo fluent-uri 0.4.1 pct_enc/Encoder#, RegNameE: Encoderrust-analyzer cargo fluent-uri 0.4.1 pct_enc/Encoder#> Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug# for Authorityrust-analyzer cargo fluent-uri 0.4.1 component/Authority#<'_, UserinfoE, RegNameE> { |
| 75 | fn fmtrust-analyzer cargo fluent-uri 0.4.1 fmt/impl#[`Authority<'_, UserinfoE, RegNameE>`][Debug]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 76 | f.debug_structrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]debug_struct().("Authority") |
| 77 | .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("userinfo", &self.userinforust-analyzer cargo fluent-uri 0.4.1 component/impl#[`Authority<'a, UserinfoE, RegNameE>`]userinfo().()) |
| 78 | .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("host", &self.hostrust-analyzer cargo fluent-uri 0.4.1 component/impl#[`Authority<'a, UserinfoE, RegNameE>`]host().()) |
| 79 | .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("host_parsed", &self.host_parsedrust-analyzer cargo fluent-uri 0.4.1 component/impl#[`Authority<'a, UserinfoE, RegNameE>`]host_parsed().()) |
| 80 | .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("port", &self.portrust-analyzer cargo fluent-uri 0.4.1 component/impl#[`Authority<'a, UserinfoE, RegNameE>`]port().()) |
| 81 | .finishrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]finish().() |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | impl Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for Authorityrust-analyzer cargo fluent-uri 0.4.1 component/Authority#<'_> { |
| 86 | #[inline] |
| 87 | fn fmtrust-analyzer cargo fluent-uri 0.4.1 fmt/impl#[`Authority<'_>`][Display]fmt().(&self, f: &mut Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 88 | Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[str][Display]fmt().(self.as_strrust-analyzer cargo fluent-uri 0.4.1 component/impl#[`Authority<'a, UserinfoE, RegNameE>`]as_str().(), f) |
| 89 | } |
| 90 | } |