Skip to main content

Service

Trait Service 

Source
pub trait Service:
    Send
    + Sync
    + 'static {
    // Required method
    fn call(&self, ctx: TaskContext) -> BoxTaskFuture;
}
Expand description

Service adapter that can be converted into a TaskFactory.

Required Methods§

Source

fn call(&self, ctx: TaskContext) -> BoxTaskFuture

Calls the service for one task child_start_count.

§Arguments
  • ctx: Per-child_start_count context passed to the service.
§Returns

Returns a boxed future for the child_start_count.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F, Fut> Service for ServiceFn<F>
where F: Fn(TaskContext) -> Fut + Send + Sync + 'static, Fut: Future<Output = TaskResult> + Send + 'static,

Source§

impl<T> Service for JobRoleAdapter<T>
where T: JobRole,

Source§

impl<T> Service for ServiceRoleAdapter<T>
where T: ServiceRole,

Source§

impl<T> Service for SidecarRoleAdapter<T>
where T: SidecarRole,

Source§

impl<T> Service for SupervisorRoleAdapter<T>
where T: SupervisorRole,

Source§

impl<T> Service for WorkerRoleAdapter<T>
where T: WorkerRole,