Function diana_actix_web::create_subscriptions_server[][src]

pub fn create_subscriptions_server<C, Q, M, S>(
    opts: Options<C, Q, M, S>
) -> Result<impl FnOnce(&mut ServiceConfig) + Clone> where
    C: Any + Send + Sync + Clone,
    Q: Clone + ObjectType + 'static,
    M: Clone + ObjectType + 'static,
    S: Clone + SubscriptionType + 'static, 
Expand description

Creates a new subscriptions server. This returns a closure that can be used with Actix Web’s .configure() function to quickly configure a new or existing Actix Web server to use Diana. For examples, see the book. This function should be used to create production servers. If your setup doesn’t require subscriptions at all, don’t configure anything in the Options and don’t worry about this function, subscriptions will automatically be disabled.