Module runtime_trait

Module runtime_trait 

Source
Expand description

运行时统一接口定义

此模块定义了 RuntimeTrait,为三种运行时实现提供统一接口:

  • ForgeRuntime (同步运行时)
  • ForgeActorRuntime (Actor运行时)
  • ForgeAsyncRuntime (异步运行时)

通过统一接口,用户可以:

  1. 轻松切换不同运行时实现
  2. 编写运行时无关的业务逻辑
  3. 使用trait对象实现运行时抽象

Traits§

RuntimeFactory
运行时工厂 trait
RuntimeTrait
运行时统一接口