pub trait RuntimeFactory {
type Runtime: RuntimeTrait;
// Required methods
fn create<'async_trait>(
options: RuntimeOptions,
) -> Pin<Box<dyn Future<Output = ForgeResult<Self::Runtime>> + Send + 'async_trait>>
where Self: 'async_trait;
fn create_with_config<'async_trait>(
options: RuntimeOptions,
config: ForgeConfig,
) -> Pin<Box<dyn Future<Output = ForgeResult<Self::Runtime>> + Send + 'async_trait>>
where Self: 'async_trait;
fn from_xml_schema_path<'life0, 'async_trait>(
xml_schema_path: &'life0 str,
options: Option<RuntimeOptions>,
config: Option<ForgeConfig>,
) -> Pin<Box<dyn Future<Output = ForgeResult<Self::Runtime>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
运行时工厂 trait
提供统一的运行时创建接口
Required Associated Types§
Sourcetype Runtime: RuntimeTrait
type Runtime: RuntimeTrait
运行时类型
Required Methods§
Sourcefn create<'async_trait>(
options: RuntimeOptions,
) -> Pin<Box<dyn Future<Output = ForgeResult<Self::Runtime>> + Send + 'async_trait>>where
Self: 'async_trait,
fn create<'async_trait>(
options: RuntimeOptions,
) -> Pin<Box<dyn Future<Output = ForgeResult<Self::Runtime>> + Send + 'async_trait>>where
Self: 'async_trait,
Sourcefn create_with_config<'async_trait>(
options: RuntimeOptions,
config: ForgeConfig,
) -> Pin<Box<dyn Future<Output = ForgeResult<Self::Runtime>> + Send + 'async_trait>>where
Self: 'async_trait,
fn create_with_config<'async_trait>(
options: RuntimeOptions,
config: ForgeConfig,
) -> Pin<Box<dyn Future<Output = ForgeResult<Self::Runtime>> + Send + 'async_trait>>where
Self: 'async_trait,
Sourcefn from_xml_schema_path<'life0, 'async_trait>(
xml_schema_path: &'life0 str,
options: Option<RuntimeOptions>,
config: Option<ForgeConfig>,
) -> Pin<Box<dyn Future<Output = ForgeResult<Self::Runtime>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn from_xml_schema_path<'life0, 'async_trait>(
xml_schema_path: &'life0 str,
options: Option<RuntimeOptions>,
config: Option<ForgeConfig>,
) -> Pin<Box<dyn Future<Output = ForgeResult<Self::Runtime>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.