Skip to main content

AsyncPlatform

Trait AsyncPlatform 

Source
pub trait AsyncPlatform {
    // Required method
    fn step_platform_async(
        &mut self,
        engine: &mut VeloxEngine,
        dt_ms: u16,
    ) -> impl Future<Output = PlatformControlFlow>;

    // Provided method
    fn duration_since_start(&self) -> Duration { ... }
}
Expand description

面向异步执行器的核心平台抽象接口(零忙等阻塞,帧刷新与空闲等待全程 .await 让出执行权)。

Required Methods§

Source

fn step_platform_async( &mut self, engine: &mut VeloxEngine, dt_ms: u16, ) -> impl Future<Output = PlatformControlFlow>

异步单步执行一次平台事件采集、状态更新与非阻塞 DMA 脏区刷屏,返回下一次循环的 PlatformControlFlow。

Provided Methods§

Source

fn duration_since_start(&self) -> Duration

返回自平台启动以来的单调递增时长。

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§