Skip to main content

ClockedComponent

Trait ClockedComponent 

Source
pub trait ClockedComponent: Sized {
    type Event;
    type Completion;
    type Fault;

    // Required methods
    fn step_at(
        &mut self,
        global_tick: GlobalTick,
        ticks_per_local_cycle: GlobalTicksPerLocalCycle,
    ) -> Result<Option<Schedule<Self::Event>>, Self::Fault>;
    fn resume(
        &mut self,
        completion: Self::Completion,
        global_tick: GlobalTick,
        ticks_per_local_cycle: GlobalTicksPerLocalCycle,
    ) -> Result<Option<Schedule<Self::Event>>, Self::Fault>;
    fn next_boundary_at(
        &self,
        global_tick: GlobalTick,
        ticks_per_local_cycle: GlobalTicksPerLocalCycle,
    ) -> Result<GlobalTick, Self::Fault>;
}
Expand description

Generic boundary for a component that participates in a global event loop.

Required Associated Types§

Required Methods§

Source

fn step_at( &mut self, global_tick: GlobalTick, ticks_per_local_cycle: GlobalTicksPerLocalCycle, ) -> Result<Option<Schedule<Self::Event>>, Self::Fault>

Source

fn resume( &mut self, completion: Self::Completion, global_tick: GlobalTick, ticks_per_local_cycle: GlobalTicksPerLocalCycle, ) -> Result<Option<Schedule<Self::Event>>, Self::Fault>

Source

fn next_boundary_at( &self, global_tick: GlobalTick, ticks_per_local_cycle: GlobalTicksPerLocalCycle, ) -> Result<GlobalTick, Self::Fault>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§