use super::impls::macros::foreach_map; use crate::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; impl SerializeAs> for VecSkipError where U: SerializeAs, { fn serialize_as(source: &Vec, serializer: S) -> Result where S: Serializer, { Vec::::serialize_as(source, serializer) } } macro_rules! map_skip_error_handling { ($tyorig:ident < K, V $(, $typaram:ident : $bound:ident)* >) => { impl SerializeAs<$tyorig> for MapSkipError where KAs: SerializeAs, VAs: SerializeAs, $($typaram: ?Sized + $bound,)* { fn serialize_as(value: &$tyorig, serializer: S) -> Result where S: Serializer, { <$tyorig>::serialize_as(value, serializer) } } } } foreach_map!(map_skip_error_handling);