提交 a2ab0dcf authored 作者: Serhij S's avatar Serhij S

0.5.1

上级 d721f03b
[package] [package]
name = "roboplc" name = "roboplc"
version = "0.5.0" version = "0.5.1"
edition = "2021" edition = "2021"
authors = ["Serhij S. <div@altertech.com>"] authors = ["Serhij S. <div@altertech.com>"]
license = "Apache-2.0" license = "Apache-2.0"
......
...@@ -34,6 +34,10 @@ pub mod prelude { ...@@ -34,6 +34,10 @@ pub mod prelude {
/// Result type, which must be returned by workers' `run` method /// Result type, which must be returned by workers' `run` method
pub type WResult = std::result::Result<(), Box<dyn std::error::Error + Send + Sync>>; pub type WResult = std::result::Result<(), Box<dyn std::error::Error + Send + Sync>>;
/// Handler result type
pub type HandlerResult =
std::result::Result<(), Box<dyn std::error::Error + Send + Sync + 'static>>;
/// Sleep step (used in blocking) /// Sleep step (used in blocking)
pub const SLEEP_STEP: Duration = Duration::from_millis(100); pub const SLEEP_STEP: Duration = Duration::from_millis(100);
...@@ -216,7 +220,7 @@ where ...@@ -216,7 +220,7 @@ where
) -> Result<()> ) -> Result<()>
where where
SH: Fn(&Context<D, V>) + Send + Sync + 'static, SH: Fn(&Context<D, V>) + Send + Sync + 'static,
RH: Fn(&Context<D, V>) -> Result<()> + Send + Sync + 'static, RH: Fn(&Context<D, V>) -> HandlerResult + Send + Sync + 'static,
{ {
let shutdown_handler = Arc::new(shutdown_handler_fn); let shutdown_handler = Arc::new(shutdown_handler_fn);
let reload_handler = Arc::new(reload_handler_fn); let reload_handler = Arc::new(reload_handler_fn);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论