usesuper::impls::macros::foreach_map; usecrate::prelude::*; #[cfg(feature = "hashbrown_0_14")] use hashbrown_0_14::HashMap as HashbrownMap014; #[cfg(feature = "hashbrown_0_15")] use hashbrown_0_15::HashMap as HashbrownMap015; #[cfg(feature = "indexmap_1")] use indexmap_1::IndexMap; #[cfg(feature = "indexmap_2")] use indexmap_2::IndexMap as IndexMap2;
enum GoodOrError<T, TAs> {
Good(T), // Only here to consume the TAs generic
Error(PhantomData<TAs>),
}
impl<'de, T, TAs> Deserialize<'de> for GoodOrError<T, TAs> where
TAs: DeserializeAs<'de, T>,
{ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
{ let is_hr = deserializer.is_human_readable(); let content: content::de::Content<'de> = Deserialize::deserialize(deserializer)?;
struct MapSkipErrorVisitor<MAP, K, KAs, V, VAs>(PhantomData<(MAP, K, KAs, V, VAs)>);
impl<'de, MAP, K, KAs, V, VAs> Visitor<'de> for MapSkipErrorVisitor<MAP, K, KAs, V, VAs> where
MAP: FromIterator<(K, V)>,
KAs: DeserializeAs<'de, K>,
VAs: DeserializeAs<'de, V>,
{ type Value = MAP;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.