Struct confql_data_resolver::DataResolver [−][src]
pub struct DataResolver { /* fields omitted */ }
Expand description
Clients interact with this struct for data resolution operations.
In particular, this forms an important part of the juniper::Context
generated by the procedural macros. Essentially this holds a PathBuf
pointing at the data root directory, and exposes a get method for
trying to resolve a generic type at a specified data address under
that root directory.
Implementations
pub fn get<T>(&self, address: &[&str]) -> Result<T, DataResolverError> where
T: for<'de> Deserialize<'de>,
T: ResolveValue,
pub fn get<T>(&self, address: &[&str]) -> Result<T, DataResolverError> where
T: for<'de> Deserialize<'de>,
T: ResolveValue,
Try to retrieve an instance of a type at a specified address under the data root directory.