Skip to main content

Definable

Trait Definable 

Source
pub trait Definable {
    // Required method
    fn register(&self, reg: &Registry) -> Result<()>;
}
Expand description

Definable 由任何构建完成的命令定义实现(spec::Command 或 builder 返回 的 Builder),使异构命令能并入一条链或一次 main 调用。

Required Methods§

Source

fn register(&self, reg: &Registry) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, R, F, E> Definable for Builder<T, R, F, E>
where T: XyzArgs, R: XyzSchema + Serialize, F: Fn(&Ctx, &T) -> Result<R, E> + Send + Sync + 'static, E: Error + Send + Sync + 'static,

Source§

impl<T, R, F, E> Definable for Command<T, R, F, E>
where T: XyzArgs, R: XyzSchema + Serialize, F: Fn(&Ctx, &T) -> Result<R, E> + Send + Sync + 'static, E: Error + Send + Sync + 'static,