pub trait SlotReservationContext: Send + Sync {
// Required methods
fn task_queue(&self) -> &str;
fn worker_identity(&self) -> &str;
fn worker_deployment_version(&self) -> &Option<WorkerDeploymentVersion>;
fn num_issued_slots(&self) -> usize;
fn is_sticky(&self) -> bool;
// Provided method
fn get_metrics_meter(&self) -> Option<TemporalMeter> { ... }
}Expand description
Context for slot reservation.
Required Methods§
Sourcefn task_queue(&self) -> &str
fn task_queue(&self) -> &str
Returns the name of the task queue this worker is polling
Sourcefn worker_identity(&self) -> &str
fn worker_identity(&self) -> &str
Returns the identity of the worker
Sourcefn worker_deployment_version(&self) -> &Option<WorkerDeploymentVersion>
fn worker_deployment_version(&self) -> &Option<WorkerDeploymentVersion>
Returns the deployment version of the worker, if one is set.
Sourcefn num_issued_slots(&self) -> usize
fn num_issued_slots(&self) -> usize
Returns the number of currently outstanding slot permits, whether used or un-used.
Provided Methods§
Sourcefn get_metrics_meter(&self) -> Option<TemporalMeter>
fn get_metrics_meter(&self) -> Option<TemporalMeter>
Returns the metrics meter if metrics are enabled
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".