Trait puffin::put_registry::Factory

source ·
pub trait Factory<PB: ProtocolBehavior> {
    // Required methods
    fn create(
        &self,
        agent_descriptor: &AgentDescriptor,
        claims: &GlobalClaimList<PB::ProtocolTypes, PB::Claim>,
        options: &PutOptions,
    ) -> Result<Box<dyn Put<PB>>, Error>;
    fn kind(&self) -> PutKind;
    fn name(&self) -> String;
    fn versions(&self) -> Vec<(String, String)>;
    fn clone_factory(&self) -> Box<dyn Factory<PB>>;

    // Provided method
    fn rng_reseed(&self) { ... }
}
Expand description

Factory for instantiating programs-under-test.

Required Methods§

source

fn create( &self, agent_descriptor: &AgentDescriptor, claims: &GlobalClaimList<PB::ProtocolTypes, PB::Claim>, options: &PutOptions, ) -> Result<Box<dyn Put<PB>>, Error>

source

fn kind(&self) -> PutKind

source

fn name(&self) -> String

source

fn versions(&self) -> Vec<(String, String)>

source

fn clone_factory(&self) -> Box<dyn Factory<PB>>

Provided Methods§

Implementors§