hashira 0.0.2-alpha

A server side rendering framework build on top of Yew
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::app::AppService;

/// A hook called when the server is initialized.
pub trait OnServerInitialize {
    /// Called on server initialization.
    fn call(&self, service: AppService);
}

impl<F> OnServerInitialize for F
    where
        F: Fn(AppService) + Send + Sync + 'static,
    {
        fn call(&self, service: AppService) {
            (self)(service);
        }
    }