pub struct StorageWorker<T, S: Storage<Output = T>, H> { /* private fields */ }
Available on crate feature storage only.
Expand description

A queue represents a consumer of a Storage.

A [Service] must be provided to be called when a new job is detected.

Implementations§

Create a new Worker instance

Set a [WorkerConfig] for Worker

Trait Implementations§

Formats the value using the given formatter. Read more
Available on crate feature worker only.
Result of handler
Available on crate feature worker only.
Message handler
Available on crate feature worker only.
The job type for the worker
Available on crate feature worker only.
The tower service to process job requests
Available on crate feature worker only.
The future returened by our tower service
Available on crate feature worker only.
At start hook of worker
Available on crate feature worker only.
At stop hook of worker
Available on crate feature worker only.
Returns a streams of jobs for the worker to consume
Available on crate feature worker only.
Returns the service that handles the job
Available on crate feature worker only.
The way the worker will handle a job
Available on crate feature worker only.
Manage a worker

Auto Trait Implementations§

Blanket Implementations§

Available on crate feature worker only.

At start hook of actor

Available on crate feature worker only.

At stop hook of actor

Available on crate feature worker only.
Capacity of worker queue
Available on crate feature worker only.
Initilize actor with its address.
Available on crate feature worker only.
Initialize actor with default values
Available on crate feature worker only.
Starts an actor and returns its address
Available on crate feature worker only.
Starts an actor with default values and returns its address
Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Available on crate feature worker only.
Result of handler
Available on crate feature worker only.
Message handler

Returns the argument unchanged.

Available on crate feature worker only.
Result of handler
Available on crate feature worker only.
Message handler
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more