Skip to main content

NodeManagerBuilder

Trait NodeManagerBuilder 

Source
pub trait NodeManagerBuilder {
    // Required method
    fn build(
        self: Box<Self>,
        context: ServerContext,
    ) -> Arc<dyn NodeManager + Sync + Send>;
}
Expand description

Trait for node manager builders. Node managers are built at the same time as the server, after it has been configured, so each custom node manager needs to defined a builder type that implements this trait.

Build is infallible, if you need anything to fail, you need to either panic or propagate that failure to the user when creating the builder.

Required Methods§

Source

fn build( self: Box<Self>, context: ServerContext, ) -> Arc<dyn NodeManager + Sync + Send>

Build the node manager, you can store data from context, but you should not hold any locks when this method has finished.

Implementors§