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 std::panic::PanicInfo;

/// A hook called when the wasm client panics.
pub trait OnClientError {
    /// Called on panics.
    fn call(&self, err: &PanicInfo);
}

impl<F> OnClientError for F
where
    F: Fn(&PanicInfo) + Send + Sync + 'static,
{
    fn call(&self, err: &PanicInfo) {
        (self)(err)
    }
}