pub type ServerStateChangedHandler = Arc<dyn Fn(ServerEvent) -> Result<()> + Sync + Send + 'static>;