pub trait SclObjectController<T: SclObject + Send> {
// Required methods
fn client(&self) -> &SclClient;
fn synchronize_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ControllerBasicError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn run<'life0, 'async_trait>(
&'life0 self,
watch_event_timeout_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<(), ControllerBasicError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Provides a single threaded SclObjectController::run that performs a full
synchronization of all T objects if any SclEvent occurs or a timeout
passes.
Required Methods§
fn client(&self) -> &SclClient
Sourcefn synchronize_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ControllerBasicError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn synchronize_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ControllerBasicError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetches all Ts and processes them one by one according to the controller’s logic.
Provided Methods§
Sourcefn run<'life0, 'async_trait>(
&'life0 self,
watch_event_timeout_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<(), ControllerBasicError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
watch_event_timeout_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<(), ControllerBasicError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Performs full synchronization on all related T objects if any watch event is
received or a periodic timer is triggered.