HookErased

Trait HookErased 

Source
pub trait HookErased<P: PhaseMarker>: Send + Sync {
    // Required methods
    fn id(&self) -> String;
    fn config_as_json(&self) -> Result<Value, Error>;
    fn run(
        &self,
        metadata: &PreparedRun,
        parmas: &RuntimeParams<P>,
    ) -> Result<Box<dyn Captured>, CapsulaError>;
}
Expand description

Engine-facing trait (object-safe, heterogenous)

Required Methods§

Source

fn id(&self) -> String

Source

fn config_as_json(&self) -> Result<Value, Error>

Source

fn run( &self, metadata: &PreparedRun, parmas: &RuntimeParams<P>, ) -> Result<Box<dyn Captured>, CapsulaError>

Implementors§

Source§

impl<T, P> HookErased<P> for T
where T: Hook<P> + Send + Sync + 'static, P: PhaseMarker,