pub trait WorkspaceControlRepository:
Send
+ Sync
+ Debug {
Show 30 methods
// Required methods
fn put_workspace<'life0, 'life1, 'async_trait>(
&'life0 self,
workspace: &'life1 WorkspaceRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_workspace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceRecord>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn list_workspaces<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
project_id: &'life2 str,
after: Option<&'life3 str>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<WorkspacePage>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn list_workspaces_global<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
after: Option<(&'life1 str, &'life2 str)>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<WorkspacePage>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn put_workspace_operation<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
workspace: &'life1 WorkspaceRecord,
operation: &'life2 WorkspaceOperation,
payload_json: &'life3 str,
idempotency_key: &'life4 str,
request_digest: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait;
fn compare_and_swap_workspace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
expected_version: u64,
lifecycle: WorkspaceLifecycle,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceRecord>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn claim_workspace_lease<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
owner: &'life3 str,
now_ms: u64,
lease_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceLease>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn release_workspace_lease<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
owner: &'life3 str,
fencing_token: u64,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn fenced_workspace_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
owner: &'life3 str,
fencing_token: u64,
lifecycle: WorkspaceLifecycle,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceRecord>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn fenced_replace_workspace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workspace: &'life1 WorkspaceRecord,
owner: &'life2 str,
fencing_token: u64,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceRecord>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn put_operation<'life0, 'life1, 'async_trait>(
&'life0 self,
operation: &'life1 WorkspaceOperation,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn put_operation_with_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
operation: &'life1 WorkspaceOperation,
payload_json: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn put_idempotent_operation<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
operation: &'life1 WorkspaceOperation,
payload_json: &'life2 str,
idempotency_key: &'life3 str,
request_digest: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn get_operation<'life0, 'life1, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceOperation>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn claim_operation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
owner: &'life2 str,
now_ms: u64,
lease_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn renew_operation_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
owner: &'life2 str,
fencing_token: u64,
now_ms: u64,
lease_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn transition_operation<'life0, 'life1, 'async_trait>(
&'life0 self,
transition: &'life1 OperationTransition,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn request_operation_cancel<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
operation_id: &'life2 str,
expected_version: u64,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn put_operation_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
payload_json: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_operation_input<'life0, 'life1, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_claimable_operations<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
now_ms: u64,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceOperation>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_claimable_operations_global<'life0, 'async_trait>(
&'life0 self,
now_ms: u64,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceOperation>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put_change_set<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 StoredChangeSet,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_change_set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredChangeSet>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn put_preview<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 StoredPreview,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_preview<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredPreview>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn stop_preview<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
expected_version: u64,
) -> Pin<Box<dyn Future<Output = Result<StoredPreview>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn retain_tenant<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
now_ms: u64,
max_rows: usize,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn record_worker_heartbeat<'life0, 'life1, 'async_trait>(
&'life0 self,
worker_id: &'life1 str,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn check_readiness<'life0, 'life1, 'async_trait>(
&'life0 self,
worker_id: &'life1 str,
now_ms: u64,
max_worker_staleness_ms: u64,
max_operation_backlog: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Required Methods§
fn put_workspace<'life0, 'life1, 'async_trait>(
&'life0 self,
workspace: &'life1 WorkspaceRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_workspace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_workspaces<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
project_id: &'life2 str,
after: Option<&'life3 str>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<WorkspacePage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn list_workspaces_global<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
after: Option<(&'life1 str, &'life2 str)>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<WorkspacePage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_workspace_operation<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
workspace: &'life1 WorkspaceRecord,
operation: &'life2 WorkspaceOperation,
payload_json: &'life3 str,
idempotency_key: &'life4 str,
request_digest: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn compare_and_swap_workspace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
expected_version: u64,
lifecycle: WorkspaceLifecycle,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceRecord>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn claim_workspace_lease<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
owner: &'life3 str,
now_ms: u64,
lease_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceLease>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn release_workspace_lease<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
owner: &'life3 str,
fencing_token: u64,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn fenced_workspace_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
owner: &'life3 str,
fencing_token: u64,
lifecycle: WorkspaceLifecycle,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceRecord>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn fenced_replace_workspace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workspace: &'life1 WorkspaceRecord,
owner: &'life2 str,
fencing_token: u64,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceRecord>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_operation<'life0, 'life1, 'async_trait>(
&'life0 self,
operation: &'life1 WorkspaceOperation,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_operation_with_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
operation: &'life1 WorkspaceOperation,
payload_json: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_idempotent_operation<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
operation: &'life1 WorkspaceOperation,
payload_json: &'life2 str,
idempotency_key: &'life3 str,
request_digest: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn get_operation<'life0, 'life1, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceOperation>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn claim_operation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
owner: &'life2 str,
now_ms: u64,
lease_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn renew_operation_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
owner: &'life2 str,
fencing_token: u64,
now_ms: u64,
lease_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transition_operation<'life0, 'life1, 'async_trait>(
&'life0 self,
transition: &'life1 OperationTransition,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn request_operation_cancel<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
operation_id: &'life2 str,
expected_version: u64,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceOperation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_operation_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
payload_json: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_operation_input<'life0, 'life1, 'async_trait>(
&'life0 self,
operation_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_claimable_operations<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
now_ms: u64,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceOperation>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_claimable_operations_global<'life0, 'async_trait>(
&'life0 self,
now_ms: u64,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceOperation>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_change_set<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 StoredChangeSet,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_change_set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredChangeSet>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_preview<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 StoredPreview,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_preview<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredPreview>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn stop_preview<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
expected_version: u64,
) -> Pin<Box<dyn Future<Output = Result<StoredPreview>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn retain_tenant<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
now_ms: u64,
max_rows: usize,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
fn record_worker_heartbeat<'life0, 'life1, 'async_trait>(
&'life0 self,
worker_id: &'life1 str,
now_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_readiness<'life0, 'life1, 'async_trait>(
&'life0 self,
worker_id: &'life1 str,
now_ms: u64,
max_worker_staleness_ms: u64,
max_operation_backlog: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".