1 2 3 4 5 6 7 8 9 10 11 12 13
/// Matched fields logic with type conversions
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize)]
pub struct MatchedFields(Vec<String>);
impl<T> From<T> for MatchedFields
where
T: IntoIterator,
T::Item: ToString,
{
fn from(value: T) -> Self {
Self(value.into_iter().map(|x| x.to_string()).collect())
}
}