| 1 | #![cfg_attr(docsrs, doc(cfg(feature = "serde")))] |
| 2 | |
| 3 | use craterust-analyzer cargo ordermap 1.2.0 crate/::{OrderMaprust-analyzer cargo ordermap 1.2.0 map/OrderMap#, OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#}; |
| 4 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/::{BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher#, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#}; |
| 5 | use serde_corerust-analyzer cargo serde_core 1.0.228 crate/::derust-analyzer cargo serde_core 1.0.228 de/::valuerust-analyzer cargo serde_core 1.0.228 de/value/::{MapDeserializerrust-analyzer cargo serde_core 1.0.228 de/value/MapDeserializer#, SeqDeserializerrust-analyzer cargo serde_core 1.0.228 de/value/SeqDeserializer#}; |
| 6 | use serde_corerust-analyzer cargo serde_core 1.0.228 crate/::derust-analyzer cargo serde_core 1.0.228 de/::{Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#, Deserializerrust-analyzer cargo serde_core 1.0.228 de/Deserializer#, Errorrust-analyzer cargo serde_core 1.0.228 de/Error#, IntoDeserializerrust-analyzer cargo serde_core 1.0.228 de/IntoDeserializer#}; |
| 7 | use serde_corerust-analyzer cargo serde_core 1.0.228 crate/::serrust-analyzer cargo serde_core 1.0.228 ser/::{Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize#, Serializerrust-analyzer cargo serde_core 1.0.228 ser/Serializer#}; |
| 8 | |
| 9 | impl<K, V, S> Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize# for OrderMaprust-analyzer cargo ordermap 1.2.0 map/OrderMap#<K, V, S> |
| 10 | where |
| 11 | K: Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize#, |
| 12 | V: Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize#, |
| 13 | { |
| 14 | fn serializerust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderMap<K, V, S>`][Serialize]serialize().<T>(&self, serializer: T) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<T::Okrust-analyzer cargo serde_core 1.0.228 ser/Serializer#Ok#, T::Errorrust-analyzer cargo serde_core 1.0.228 ser/Serializer#Error#> |
| 15 | where |
| 16 | T: Serializerrust-analyzer cargo serde_core 1.0.228 ser/Serializer#, |
| 17 | { |
| 18 | self.innerrust-analyzer cargo ordermap 1.2.0 map/OrderMap#inner..serializerust-analyzer cargo indexmap 2.14.0 serde/impl#[`IndexMap<K, V, S>`][Serialize]serialize().(serializer) |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | impl<'de, K, V, S> Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#<'de> for OrderMaprust-analyzer cargo ordermap 1.2.0 map/OrderMap#<K, V, S> |
| 23 | where |
| 24 | K: Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#<'de> + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#, |
| 25 | V: Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#<'de>, |
| 26 | S: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# + BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher#, |
| 27 | { |
| 28 | fn deserializerust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderMap<K, V, S>`][`Deserialize<'de>`]deserialize().<D>(deserializer: D) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderMap<K, V, S>`][`Deserialize<'de>`], D::Errorrust-analyzer cargo serde_core 1.0.228 de/Deserializer#Error#> |
| 29 | where |
| 30 | D: Deserializerrust-analyzer cargo serde_core 1.0.228 de/Deserializer#<'de>, |
| 31 | { |
| 32 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Selfrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderMap<K, V, S>`][`Deserialize<'de>`] { |
| 33 | innerrust-analyzer cargo ordermap 1.2.0 map/OrderMap#inner.: <_>::deserializerust-analyzer cargo indexmap 2.14.0 serde/impl#[`IndexMap<K, V, S>`][`Deserialize<'de>`]deserialize().(deserializer)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()., |
| 34 | }) |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | impl<'de, K, V, S, E> IntoDeserializerrust-analyzer cargo serde_core 1.0.228 de/IntoDeserializer#<'de, E> for OrderMaprust-analyzer cargo ordermap 1.2.0 map/OrderMap#<K, V, S> |
| 39 | where |
| 40 | K: IntoDeserializerrust-analyzer cargo serde_core 1.0.228 de/IntoDeserializer#<'de, E> + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#, |
| 41 | V: IntoDeserializerrust-analyzer cargo serde_core 1.0.228 de/IntoDeserializer#<'de, E>, |
| 42 | S: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher#, |
| 43 | E: Errorrust-analyzer cargo serde_core 1.0.228 de/Error#, |
| 44 | { |
| 45 | type Deserializerrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderMap<K, V, S>`][`IntoDeserializer<'de, E>`]Deserializer# = MapDeserializerrust-analyzer cargo serde_core 1.0.228 de/value/MapDeserializer#<'de, <Selfrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderMap<K, V, S>`][`IntoDeserializer<'de, E>`] as IntoIteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#>::IntoIterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#IntoIter#, E>; |
| 46 | |
| 47 | fn into_deserializerrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderMap<K, V, S>`][`IntoDeserializer<'de, E>`]into_deserializer().(self) -> Selfrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderMap<K, V, S>`][`IntoDeserializer<'de, E>`]::Deserializerrust-analyzer cargo serde_core 1.0.228 de/IntoDeserializer#Deserializer# { |
| 48 | self.innerrust-analyzer cargo ordermap 1.2.0 map/OrderMap#inner..into_deserializerrust-analyzer cargo indexmap 2.14.0 serde/impl#[`IndexMap<K, V, S>`][`IntoDeserializer<'de, E>`]into_deserializer().() |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | impl<T, S> Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize# for OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 53 | where |
| 54 | T: Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize#, |
| 55 | { |
| 56 | fn serializerust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderSet<T, S>`][Serialize]serialize().<Se>(&self, serializer: Se) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Se::Okrust-analyzer cargo serde_core 1.0.228 ser/Serializer#Ok#, Se::Errorrust-analyzer cargo serde_core 1.0.228 ser/Serializer#Error#> |
| 57 | where |
| 58 | Se: Serializerrust-analyzer cargo serde_core 1.0.228 ser/Serializer#, |
| 59 | { |
| 60 | self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..serializerust-analyzer cargo indexmap 2.14.0 serde/impl#[`IndexSet<T, S>`][Serialize]serialize().(serializer) |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | impl<'de, T, S> Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#<'de> for OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 65 | where |
| 66 | T: Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#<'de> + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#, |
| 67 | S: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# + BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher#, |
| 68 | { |
| 69 | fn deserializerust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderSet<T, S>`][`Deserialize<'de>`]deserialize().<D>(deserializer: D) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderSet<T, S>`][`Deserialize<'de>`], D::Errorrust-analyzer cargo serde_core 1.0.228 de/Deserializer#Error#> |
| 70 | where |
| 71 | D: Deserializerrust-analyzer cargo serde_core 1.0.228 de/Deserializer#<'de>, |
| 72 | { |
| 73 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Selfrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderSet<T, S>`][`Deserialize<'de>`] { |
| 74 | innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner.: <_>::deserializerust-analyzer cargo indexmap 2.14.0 serde/impl#[`IndexSet<T, S>`][`Deserialize<'de>`]deserialize().(deserializer)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()., |
| 75 | }) |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | impl<'de, T, S, E> IntoDeserializerrust-analyzer cargo serde_core 1.0.228 de/IntoDeserializer#<'de, E> for OrderSetrust-analyzer cargo ordermap 1.2.0 set/OrderSet#<T, S> |
| 80 | where |
| 81 | T: IntoDeserializerrust-analyzer cargo serde_core 1.0.228 de/IntoDeserializer#<'de, E> + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#, |
| 82 | S: BuildHasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/BuildHasher#, |
| 83 | E: Errorrust-analyzer cargo serde_core 1.0.228 de/Error#, |
| 84 | { |
| 85 | type Deserializerrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderSet<T, S>`][`IntoDeserializer<'de, E>`]Deserializer# = SeqDeserializerrust-analyzer cargo serde_core 1.0.228 de/value/SeqDeserializer#<<Selfrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderSet<T, S>`][`IntoDeserializer<'de, E>`] as IntoIteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#>::IntoIterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/collect/IntoIterator#IntoIter#, E>; |
| 86 | |
| 87 | fn into_deserializerrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderSet<T, S>`][`IntoDeserializer<'de, E>`]into_deserializer().(self) -> Selfrust-analyzer cargo ordermap 1.2.0 serde/impl#[`OrderSet<T, S>`][`IntoDeserializer<'de, E>`]::Deserializerrust-analyzer cargo serde_core 1.0.228 de/IntoDeserializer#Deserializer# { |
| 88 | self.innerrust-analyzer cargo ordermap 1.2.0 set/OrderSet#inner..into_deserializerrust-analyzer cargo indexmap 2.14.0 serde/impl#[`IndexSet<T, S>`][`IntoDeserializer<'de, E>`]into_deserializer().() |
| 89 | } |
| 90 | } |