Skip to main content

before_start

Macro before_start 

Source
macro_rules! before_start {
    ($f:expr) => { ... };
    ($f:expr, $opts:expr) => { ... };
}
Expand description

注册 BeforeStart Hook

自动以函数名作为 Hook 名称,HookOptions 可选。

§Examples

// 仅传函数,使用默认选项
x_one::before_start!(|| Ok(()));

// 指定选项
x_one::before_start!(|| Ok(()), HookOptions::new().order(10));