[][src]Trait warpgrapher::engine::context::GlobalContext

pub trait GlobalContext: 'static + Clone + Debug + Send + Sync { }

Trait that, when implemented, marks a struct as a global context, used to pass data to custom extensions and resolvers

Examples


#[derive(Clone, Debug)]
struct AppContext {
    app_specific_config: String
}

impl GlobalContext for AppContext {}

let ac = AppContext { app_specific_config: "".to_string() };

Implementations on Foreign Types

impl GlobalContext for ()[src]

Loading content...

Implementors

Loading content...