pub trait SpaceFactory:
'static
+ Send
+ Sync
+ Debug {
// Required methods
fn default_config(&self, config: &mut Config) -> K2Result<()>;
fn validate_config(&self, config: &Config) -> K2Result<()>;
fn create(
&self,
builder: Arc<Builder>,
handler: DynSpaceHandler,
space: SpaceId,
tx: DynTransport,
) -> BoxFut<'static, K2Result<DynSpace>>;
}
Expand description
A factory for constructing Space instances.
Required Methods§
Sourcefn default_config(&self, config: &mut Config) -> K2Result<()>
fn default_config(&self, config: &mut Config) -> K2Result<()>
Help the builder construct a default config from the chosen module factories.
Sourcefn validate_config(&self, config: &Config) -> K2Result<()>
fn validate_config(&self, config: &Config) -> K2Result<()>
Validate configuration.
Sourcefn create(
&self,
builder: Arc<Builder>,
handler: DynSpaceHandler,
space: SpaceId,
tx: DynTransport,
) -> BoxFut<'static, K2Result<DynSpace>>
fn create( &self, builder: Arc<Builder>, handler: DynSpaceHandler, space: SpaceId, tx: DynTransport, ) -> BoxFut<'static, K2Result<DynSpace>>
Construct a space instance.