datasources 0.1.5

Async datasource interfaces, middleware, registry, and test doubles
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::mappers::type_map_field::TypeMapField;

#[derive(Clone, Debug, PartialEq, Eq)]
pub struct TypeMap {
    pub key: String,
    pub fields: Vec<(String, TypeMapField)>,
}

impl TypeMap {
    pub fn new(key: impl Into<String>, fields: Vec<(String, TypeMapField)>) -> Self {
        Self {
            key: key.into(),
            fields,
        }
    }
}