ServiceWorker

Trait ServiceWorker 

Source
pub trait ServiceWorker<UserData, FeaturesControl, FeaturesEvent, ServiceControl, ServiceEvent, ToController, ToWorker> {
    // Required methods
    fn is_service_empty(&self) -> bool;
    fn service_id(&self) -> u8;
    fn service_name(&self) -> &str;
    fn on_tick(&mut self, _ctx: &ServiceWorkerCtx, _now: u64, _tick_count: u64);
    fn on_input(
        &mut self,
        _ctx: &ServiceWorkerCtx,
        _now: u64,
        input: ServiceWorkerInput<UserData, FeaturesEvent, ServiceControl, ToWorker>,
    );
    fn on_shutdown(&mut self, _ctx: &ServiceWorkerCtx, _now: u64);
    fn pop_output2(
        &mut self,
        _now: u64,
    ) -> Option<ServiceWorkerOutput<UserData, FeaturesControl, FeaturesEvent, ServiceControl, ServiceEvent, ToController>>;
}

Required Methods§

Source

fn is_service_empty(&self) -> bool

Source

fn service_id(&self) -> u8

Source

fn service_name(&self) -> &str

Source

fn on_tick(&mut self, _ctx: &ServiceWorkerCtx, _now: u64, _tick_count: u64)

Source

fn on_input( &mut self, _ctx: &ServiceWorkerCtx, _now: u64, input: ServiceWorkerInput<UserData, FeaturesEvent, ServiceControl, ToWorker>, )

Source

fn on_shutdown(&mut self, _ctx: &ServiceWorkerCtx, _now: u64)

Source

fn pop_output2( &mut self, _now: u64, ) -> Option<ServiceWorkerOutput<UserData, FeaturesControl, FeaturesEvent, ServiceControl, ServiceEvent, ToController>>

Trait Implementations§

Source§

impl<UserData, FeaturesControl, FeaturesEvent, ServiceControl, ServiceEvent, ToController, ToWorker> TaskSwitcherChild<ServiceWorkerOutput<UserData, FeaturesControl, FeaturesEvent, ServiceControl, ServiceEvent, ToController>> for Box<dyn ServiceWorker<UserData, FeaturesControl, FeaturesEvent, ServiceControl, ServiceEvent, ToController, ToWorker>>

Source§

type Time = u64

Source§

fn empty_event( &self, ) -> ServiceWorkerOutput<UserData, FeaturesControl, FeaturesEvent, ServiceControl, ServiceEvent, ToController>

Source§

fn is_empty(&self) -> bool

Source§

fn pop_output( &mut self, now: u64, ) -> Option<ServiceWorkerOutput<UserData, FeaturesControl, FeaturesEvent, ServiceControl, ServiceEvent, ToController>>

Implementors§

Source§

impl<UserData, SC, SE, TC, TW> ServiceWorker<UserData, FeaturesControl, FeaturesEvent, SC, SE, TC, TW> for Manual2DiscoveryServiceWorker<UserData, SC, SE, TC>

Source§

impl<UserData, SC, SE, TC, TW> ServiceWorker<UserData, FeaturesControl, FeaturesEvent, SC, SE, TC, TW> for ManualDiscoveryServiceWorker<UserData, SC, SE, TC>

Source§

impl<UserData, SC, SE, TC, TW> ServiceWorker<UserData, FeaturesControl, FeaturesEvent, SC, SE, TC, TW> for VisualizationServiceWorker<UserData, SC, SE, TC>