Trait headless_lms_models::SpecFetcher

source ·
pub trait SpecFetcher: for<'a> Fn(Url, &'a str, Option<&'a Value>) -> BoxFuture<'a, ModelResult<Value>> { }
Expand description

A “trait alias” so this for<'a> … string doesn’t need to be repeated everywhere Arguments: Url: The URL that the request is sent to (the exercise service’s endpoint) &str: Exercise type/service slug Option<Value>: The Json for the request, for example the private spec in a public spec request

Implementors§

source§

impl<T: for<'a> Fn(Url, &'a str, Option<&'a Value>) -> BoxFuture<'a, ModelResult<Value>>> SpecFetcher for T