pub struct PgRegistryStore { /* private fields */ }Expand description
Postgres-backed RegistryStore implementation.
Implementations§
Source§impl PgRegistryStore
impl PgRegistryStore
Trait Implementations§
Source§impl Clone for PgRegistryStore
impl Clone for PgRegistryStore
Source§fn clone(&self) -> PgRegistryStore
fn clone(&self) -> PgRegistryStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl RegistryStore for PgRegistryStore
impl RegistryStore for PgRegistryStore
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Ping the backing database. Returns
Ok(()) if the store is reachable.
Implementations should issue the cheapest possible liveness check
(SELECT 1 for SQL backends).Source§fn create_api_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Option<Uuid>,
name: &'life1 str,
scopes: &'life2 [TokenScope],
expires_at: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<(String, ApiToken), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_api_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Option<Uuid>,
name: &'life1 str,
scopes: &'life2 [TokenScope],
expires_at: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<(String, ApiToken), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
Create a new API token. Returns the plaintext token (shown once) and
the persisted
ApiToken record.Source§fn find_api_token_by_id<'life0, 'async_trait>(
&'life0 self,
token_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<ApiToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_api_token_by_id<'life0, 'async_trait>(
&'life0 self,
token_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<ApiToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a token by its database id.
Source§fn list_api_tokens_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<ApiToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_api_tokens_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<ApiToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
List every token that belongs to an organization, newest first.
Source§fn find_api_token_by_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ApiToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_api_token_by_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ApiToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a token by its public prefix within an organization.
Source§fn verify_api_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ApiToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn verify_api_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ApiToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Verify a plaintext token string against stored hashes, updating
last_used_at on success. Returns None for invalid or expired tokens.Source§fn delete_api_token<'life0, 'async_trait>(
&'life0 self,
token_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn delete_api_token<'life0, 'async_trait>(
&'life0 self,
token_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Permanently delete a token.
Source§fn rotate_api_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token_id: Uuid,
new_name: Option<&'life1 str>,
delete_old: bool,
) -> Pin<Box<dyn Future<Output = Result<(String, ApiToken, Option<ApiToken>), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn rotate_api_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token_id: Uuid,
new_name: Option<&'life1 str>,
delete_old: bool,
) -> Pin<Box<dyn Future<Output = Result<(String, ApiToken, Option<ApiToken>), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Rotate an existing token — create a replacement with the same scopes
and optionally delete the old one. Returns the new plaintext token,
the new record, and the deleted record (when
delete_old was true).Source§fn find_api_tokens_needing_rotation<'life0, 'async_trait>(
&'life0 self,
org_id: Option<Uuid>,
days_old: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<ApiToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_api_tokens_needing_rotation<'life0, 'async_trait>(
&'life0 self,
org_id: Option<Uuid>,
days_old: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<ApiToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Find tokens older than
days_old, optionally scoped to a single org.Source§fn get_org_setting<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<OrgSetting>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_org_setting<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<OrgSetting>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Fetch a single org-level setting by key, returning
None when absent.Source§fn set_org_setting<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
key: &'life1 str,
value: Value,
) -> Pin<Box<dyn Future<Output = Result<OrgSetting, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn set_org_setting<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
key: &'life1 str,
value: Value,
) -> Pin<Box<dyn Future<Output = Result<OrgSetting, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Upsert an org-level setting, returning the persisted record.
Source§fn delete_org_setting<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn delete_org_setting<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Delete an org-level setting by key. Idempotent.
Source§fn create_organization<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
slug: &'life2 str,
owner_id: Uuid,
plan: Plan,
) -> Pin<Box<dyn Future<Output = Result<Organization, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_organization<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
slug: &'life2 str,
owner_id: Uuid,
plan: Plan,
) -> Pin<Box<dyn Future<Output = Result<Organization, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
Create a new organization and auto-create the owner membership.
Source§fn find_organization_by_id<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Organization>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_organization_by_id<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Organization>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Look up an organization by id.
Source§fn find_organization_by_slug<'life0, 'life1, 'async_trait>(
&'life0 self,
slug: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Organization>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_organization_by_slug<'life0, 'life1, 'async_trait>(
&'life0 self,
slug: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Organization>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Look up an organization by slug.
Source§fn list_organizations_by_user<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Organization>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_organizations_by_user<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Organization>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
List all organizations a user belongs to (as owner or member).
Source§fn update_organization_name<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_organization_name<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Update an organization’s display name.
Source§fn update_organization_slug<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
slug: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_organization_slug<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
slug: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Update an organization’s slug.
Source§fn update_organization_plan<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
plan: Plan,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_organization_plan<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
plan: Plan,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Update an organization’s plan (and refresh limits).
Source§fn organization_has_active_subscription<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn organization_has_active_subscription<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Check whether an organization has an active or trialing subscription.
Source§fn delete_organization<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn delete_organization<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Permanently delete an organization (cascades to related rows).
Source§fn create_org_member<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Uuid,
role: OrgRole,
) -> Pin<Box<dyn Future<Output = Result<OrgMember, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_org_member<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Uuid,
role: OrgRole,
) -> Pin<Box<dyn Future<Output = Result<OrgMember, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Add a user to an organization with the given role.
Source§fn find_org_member<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<OrgMember>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_org_member<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<OrgMember>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a specific (org, user) membership.
Source§fn list_org_members<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<OrgMember>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_org_members<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<OrgMember>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
List every member of an organization, oldest first.
Source§fn update_org_member_role<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Uuid,
role: OrgRole,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_org_member_role<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Uuid,
role: OrgRole,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Update a member’s role.
Source§fn delete_org_member<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn delete_org_member<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Remove a member from an organization.
Source§fn record_audit_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Option<Uuid>,
event_type: AuditEventType,
description: String,
metadata: Option<Value>,
ip_address: Option<&'life1 str>,
user_agent: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn record_audit_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Option<Uuid>,
event_type: AuditEventType,
description: String,
metadata: Option<Value>,
ip_address: Option<&'life1 str>,
user_agent: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
Best-effort audit event recording. Failures are logged and swallowed
so they never block the caller’s primary operation.
Source§fn list_audit_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
limit: Option<i64>,
offset: Option<i64>,
event_types: &'life1 [AuditEventType],
) -> Pin<Box<dyn Future<Output = Result<Vec<AuditLog>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_audit_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
limit: Option<i64>,
offset: Option<i64>,
event_types: &'life1 [AuditEventType],
) -> Pin<Box<dyn Future<Output = Result<Vec<AuditLog>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
List audit logs for an organization with optional filters. Read more
Source§fn count_audit_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
event_types: &'life1 [AuditEventType],
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_audit_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
event_types: &'life1 [AuditEventType],
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Count audit logs matching the filter (for pagination).
Source§fn record_feature_usage<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Option<Uuid>,
feature: FeatureType,
metadata: Option<Value>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn record_feature_usage<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Option<Uuid>,
feature: FeatureType,
metadata: Option<Value>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Record a feature-usage event. Failures are logged and swallowed.
Source§fn count_feature_usage_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
feature: FeatureType,
days: i64,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_feature_usage_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
feature: FeatureType,
days: i64,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Count how many times an org used a feature over the last
days days.fn record_suspicious_activity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
org_id: Option<Uuid>,
user_id: Option<Uuid>,
activity_type: SuspiciousActivityType,
severity: &'life1 str,
description: String,
metadata: Option<Value>,
ip_address: Option<&'life2 str>,
user_agent: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn create_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
username: &'life1 str,
email: &'life2 str,
password_hash: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
username: &'life1 str,
email: &'life2 str,
password_hash: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
Create a new user with an already-hashed password.
Source§fn find_user_by_id<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_user_by_id<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a user by id.
Source§fn find_user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a user by email.
Source§fn find_user_by_username<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_user_by_username<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a user by username.
Source§fn find_users_by_ids<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<Vec<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_users_by_ids<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<Vec<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Batch lookup by id to avoid N+1 queries.
Source§fn set_user_api_token<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: Uuid,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn set_user_api_token<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: Uuid,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Set the persistent API token on a user record.
Source§fn enable_user_2fa<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: Uuid,
secret: &'life1 str,
backup_codes: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn enable_user_2fa<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: Uuid,
secret: &'life1 str,
backup_codes: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
Enable TOTP 2FA for a user with the given secret and hashed backup codes.
Source§fn disable_user_2fa<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn disable_user_2fa<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Disable 2FA and clear stored secret + backup codes.
Source§fn update_user_2fa_verified<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_user_2fa_verified<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Refresh the 2FA verified timestamp (e.g. after a successful TOTP challenge).
Source§fn remove_user_backup_code<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
code_index: usize,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn remove_user_backup_code<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
code_index: usize,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Remove a consumed backup code by index.
Source§fn find_user_by_github_id<'life0, 'life1, 'async_trait>(
&'life0 self,
github_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_user_by_github_id<'life0, 'life1, 'async_trait>(
&'life0 self,
github_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a user by their GitHub account id.
Source§fn find_user_by_google_id<'life0, 'life1, 'async_trait>(
&'life0 self,
google_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_user_by_google_id<'life0, 'life1, 'async_trait>(
&'life0 self,
google_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a user by their Google account id.
Source§fn link_user_github_account<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: Uuid,
github_id: &'life1 str,
avatar_url: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn link_user_github_account<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: Uuid,
github_id: &'life1 str,
avatar_url: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
Link an existing user to a GitHub account (sets github_id, auth_provider, avatar_url).
Source§fn link_user_google_account<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: Uuid,
google_id: &'life1 str,
avatar_url: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn link_user_google_account<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: Uuid,
google_id: &'life1 str,
avatar_url: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
Link an existing user to a Google account (sets google_id, auth_provider, avatar_url).
Source§fn create_oauth_user<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
username: &'life1 str,
email: &'life2 str,
password_hash: &'life3 str,
auth_provider: &'life4 str,
github_id: Option<&'life5 str>,
google_id: Option<&'life6 str>,
avatar_url: Option<&'life7 str>,
) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_oauth_user<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
username: &'life1 str,
email: &'life2 str,
password_hash: &'life3 str,
auth_provider: &'life4 str,
github_id: Option<&'life5 str>,
google_id: Option<&'life6 str>,
avatar_url: Option<&'life7 str>,
) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
PgRegistryStore: 'async_trait,
Create a new verified user from an OAuth provider (random password hash).
Source§fn get_or_create_personal_org<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: Uuid,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Organization, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_or_create_personal_org<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: Uuid,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Organization, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Fetch or create a user’s personal/default organization.
Source§fn update_user_password_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: Uuid,
password_hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_user_password_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: Uuid,
password_hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Replace a user’s password hash (no-op on verification).
Source§fn mark_user_verified<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn mark_user_verified<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Mark a user’s email as verified.
Source§fn update_user_profile<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: Uuid,
username: Option<&'life1 str>,
email: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_user_profile<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: Uuid,
username: Option<&'life1 str>,
email: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<User, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
Update a user’s username and/or email. Pass
None to leave a field unchanged.
Returns the updated user.Source§fn update_user_notification_prefs<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
email_notifications: bool,
security_alerts: bool,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_user_notification_prefs<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
email_notifications: bool,
security_alerts: bool,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Update a user’s notification-preference flags.
Source§fn update_user_preferences<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: Uuid,
preferences: &'life1 Value,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_user_preferences<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: Uuid,
preferences: &'life1 Value,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Replace a user’s UI preferences JSON blob.
Source§fn create_verification_token<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<VerificationToken, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_verification_token<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<VerificationToken, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Create a new verification token for a user (24h default expiry).
Source§fn set_verification_token_expiry_hours<'life0, 'async_trait>(
&'life0 self,
token_id: Uuid,
hours: i64,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn set_verification_token_expiry_hours<'life0, 'async_trait>(
&'life0 self,
token_id: Uuid,
hours: i64,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Shorten a verification token’s expiry to
hours from now.
Used by password-reset to override the default 24h window.Source§fn find_verification_token_by_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<VerificationToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_verification_token_by_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<VerificationToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a verification token by its plaintext token string.
Source§fn mark_verification_token_used<'life0, 'async_trait>(
&'life0 self,
token_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn mark_verification_token_used<'life0, 'async_trait>(
&'life0 self,
token_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Mark a verification token as consumed.
fn create_federation<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
org_id: Uuid,
created_by: Uuid,
name: &'life1 str,
description: &'life2 str,
services: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<Federation, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_federation_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Federation>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_federations_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Federation>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_federation<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: Uuid,
name: Option<&'life1 str>,
description: Option<&'life2 str>,
services: Option<&'life3 Value>,
) -> Pin<Box<dyn Future<Output = Result<Option<Federation>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn delete_federation<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn create_federation_scenario_activation<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
federation_id: Uuid,
scenario_id: Option<Uuid>,
scenario_name: &'life1 str,
manifest_snapshot: &'life2 Value,
service_overrides: &'life3 Value,
per_service_state: &'life4 Value,
activated_by: Uuid,
) -> Pin<Box<dyn Future<Output = Result<FederationScenarioActivation, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_federation_scenario_activation<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
federation_id: Uuid,
scenario_id: Option<Uuid>,
scenario_name: &'life1 str,
manifest_snapshot: &'life2 Value,
service_overrides: &'life3 Value,
per_service_state: &'life4 Value,
activated_by: Uuid,
) -> Pin<Box<dyn Future<Output = Result<FederationScenarioActivation, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
PgRegistryStore: 'async_trait,
Record a new active scenario for a federation. The caller is
responsible for ensuring no other scenario is currently active — the
database enforces this invariant with a partial unique index.
Source§fn find_active_federation_scenario_activation<'life0, 'async_trait>(
&'life0 self,
federation_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<FederationScenarioActivation>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_active_federation_scenario_activation<'life0, 'async_trait>(
&'life0 self,
federation_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<FederationScenarioActivation>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Return the currently active scenario activation for a federation, if
any. Deactivated/failed rows are excluded.
Source§fn deactivate_federation_scenario_activation<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<FederationScenarioActivation>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn deactivate_federation_scenario_activation<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<FederationScenarioActivation>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Mark an activation as deactivated, setting
deactivated_at = now().Source§fn update_federation_scenario_per_service_state<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
per_service_state: &'life1 Value,
) -> Pin<Box<dyn Future<Output = Result<Option<FederationScenarioActivation>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_federation_scenario_per_service_state<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
per_service_state: &'life1 Value,
) -> Pin<Box<dyn Future<Output = Result<Option<FederationScenarioActivation>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Overwrite the
per_service_state JSON for an activation — the runtime
uses this to flip services from pending → applied as they observe
the overrides.Source§fn find_active_federation_scenarios_for_workspace<'life0, 'async_trait>(
&'life0 self,
workspace_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<FederationScenarioActivation>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_active_federation_scenarios_for_workspace<'life0, 'async_trait>(
&'life0 self,
workspace_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<FederationScenarioActivation>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Active activations whose federation’s services list the given
workspace. This backs the runtime-side polling endpoint.
Source§fn list_unresolved_suspicious_activities<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Option<Uuid>,
user_id: Option<Uuid>,
severity: Option<&'life1 str>,
limit: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SuspiciousActivity>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_unresolved_suspicious_activities<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Option<Uuid>,
user_id: Option<Uuid>,
severity: Option<&'life1 str>,
limit: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SuspiciousActivity>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
List unresolved suspicious activities with optional filters.
Source§fn count_unresolved_suspicious_activities<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_unresolved_suspicious_activities<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Count unresolved suspicious activities for an org.
Source§fn resolve_suspicious_activity<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
activity_id: Uuid,
resolved_by: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn resolve_suspicious_activity<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
activity_id: Uuid,
resolved_by: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Mark a suspicious activity as resolved by the given user, scoped to
org_id. The org constraint is enforced inside the UPDATE so callers
from one organization cannot resolve activities belonging to another.
Returns StoreError::NotFound when no matching activity exists.fn create_cloud_workspace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
org_id: Uuid,
created_by: Uuid,
name: &'life1 str,
description: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Workspace, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_cloud_workspace_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Workspace>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_cloud_workspaces_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Workspace>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_cloud_workspace<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: Uuid,
name: Option<&'life1 str>,
description: Option<&'life2 str>,
is_active: Option<bool>,
settings: Option<&'life3 Value>,
) -> Pin<Box<dyn Future<Output = Result<Option<Workspace>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn delete_cloud_workspace<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_cloud_service<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
org_id: Uuid,
workspace_id: Option<Uuid>,
created_by: Uuid,
name: &'life1 str,
description: &'life2 str,
base_url: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<CloudService, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_cloud_service_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<CloudService>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_cloud_services_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<CloudService>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_cloud_services_by_workspace<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
workspace_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<CloudService>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn update_cloud_service<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
id: Uuid,
name: Option<&'life1 str>,
description: Option<&'life2 str>,
base_url: Option<&'life3 str>,
enabled: Option<bool>,
tags: Option<&'life4 Value>,
routes: Option<&'life5 Value>,
workspace_id: Option<Option<Uuid>>,
) -> Pin<Box<dyn Future<Output = Result<Option<CloudService>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_cloud_service<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
id: Uuid,
name: Option<&'life1 str>,
description: Option<&'life2 str>,
base_url: Option<&'life3 str>,
enabled: Option<bool>,
tags: Option<&'life4 Value>,
routes: Option<&'life5 Value>,
workspace_id: Option<Option<Uuid>>,
) -> Pin<Box<dyn Future<Output = Result<Option<CloudService>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
PgRegistryStore: 'async_trait,
Update a cloud service. The
workspace_id parameter is tri-state:
None = leave the column untouched, Some(None) = unassign (write
SQL NULL), Some(Some(id)) = assign to workspace id.fn delete_cloud_service<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_cloud_fixture<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'async_trait>(
&'life0 self,
org_id: Uuid,
created_by: Uuid,
name: &'life1 str,
description: &'life2 str,
path: &'life3 str,
method: &'life4 str,
content: Option<&'life5 Value>,
protocol: Option<&'life6 str>,
tags: Option<&'life7 Value>,
workspace_id: Option<Uuid>,
route_path: Option<&'life8 str>,
) -> Pin<Box<dyn Future<Output = Result<CloudFixture, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_cloud_fixture_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<CloudFixture>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn list_cloud_fixtures_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
workspace_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CloudFixture>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_cloud_fixtures_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
workspace_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CloudFixture>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
List fixtures in an organization. When
workspace_id is Some, only
fixtures assigned to that workspace are returned; when None, every
fixture in the org is returned.Source§fn update_cloud_fixture<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'async_trait>(
&'life0 self,
id: Uuid,
name: Option<&'life1 str>,
description: Option<&'life2 str>,
path: Option<&'life3 str>,
method: Option<&'life4 str>,
content: Option<&'life5 Value>,
protocol: Option<&'life6 str>,
tags: Option<&'life7 Value>,
route_path: Option<&'life8 str>,
workspace_id: Option<Option<Uuid>>,
) -> Pin<Box<dyn Future<Output = Result<Option<CloudFixture>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_cloud_fixture<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'async_trait>(
&'life0 self,
id: Uuid,
name: Option<&'life1 str>,
description: Option<&'life2 str>,
path: Option<&'life3 str>,
method: Option<&'life4 str>,
content: Option<&'life5 Value>,
protocol: Option<&'life6 str>,
tags: Option<&'life7 Value>,
route_path: Option<&'life8 str>,
workspace_id: Option<Option<Uuid>>,
) -> Pin<Box<dyn Future<Output = Result<Option<CloudFixture>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
PgRegistryStore: 'async_trait,
Update mutable fields on a cloud fixture.
workspace_id is tri-state:
None leaves it untouched; Some(None) clears it; Some(Some(id))
assigns/changes it.fn delete_cloud_fixture<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn delete_cloud_fixtures_bulk<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<Vec<Uuid>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn delete_cloud_fixtures_bulk<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<Vec<Uuid>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Delete many fixtures atomically, scoped to an org. Returns the IDs
that were actually deleted.
fn create_hosted_mock<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
org_id: Uuid,
project_id: Option<Uuid>,
name: &'life1 str,
slug: &'life2 str,
description: Option<&'life3 str>,
config_json: Value,
openapi_spec_url: Option<&'life4 str>,
region: Option<&'life5 str>,
) -> Pin<Box<dyn Future<Output = Result<HostedMock, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_hosted_mock_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<HostedMock>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_hosted_mock_by_slug<'life0, 'life1, 'async_trait>(
&'life0 self,
org_id: Uuid,
slug: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<HostedMock>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_hosted_mocks_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<HostedMock>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_hosted_mock_status<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
status: DeploymentStatus,
error_message: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_hosted_mock_urls<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: Uuid,
deployment_url: Option<&'life1 str>,
internal_url: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_hosted_mock_health<'life0, 'life1, 'async_trait>(
&'life0 self,
id: Uuid,
health_status: HealthStatus,
health_check_url: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn delete_hosted_mock<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn subscribe_waitlist<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
email: &'life1 str,
source: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<WaitlistSubscriber, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn unsubscribe_waitlist_by_token<'life0, 'async_trait>(
&'life0 self,
token: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_or_create_current_usage_counter<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<UsageCounter, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_usage_counters_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UsageCounter>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_sso_config_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<SSOConfiguration>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn upsert_sso_config<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
org_id: Uuid,
provider: SSOProvider,
saml_entity_id: Option<&'life1 str>,
saml_sso_url: Option<&'life2 str>,
saml_slo_url: Option<&'life3 str>,
saml_x509_cert: Option<&'life4 str>,
saml_name_id_format: Option<&'life5 str>,
attribute_mapping: Option<Value>,
require_signed_assertions: bool,
require_signed_responses: bool,
allow_unsolicited_responses: bool,
) -> Pin<Box<dyn Future<Output = Result<SSOConfiguration, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
PgRegistryStore: 'async_trait,
fn enable_sso_config<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn disable_sso_config<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn delete_sso_config<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn is_saml_assertion_used<'life0, 'life1, 'async_trait>(
&'life0 self,
assertion_id: &'life1 str,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn record_saml_assertion_used<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
assertion_id: &'life1 str,
org_id: Uuid,
user_id: Option<Uuid>,
name_id: Option<&'life2 str>,
issued_at: DateTime<Utc>,
expires_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<SAMLAssertionId, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_org_template<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
org_id: Uuid,
name: &'life1 str,
description: Option<&'life2 str>,
blueprint_config: Option<Value>,
security_baseline: Option<Value>,
created_by: Uuid,
is_default: bool,
) -> Pin<Box<dyn Future<Output = Result<OrgTemplate, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_org_template_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<OrgTemplate>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_org_templates_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<OrgTemplate>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_org_template<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
template: &'life1 OrgTemplate,
name: Option<&'life2 str>,
description: Option<&'life3 str>,
blueprint_config: Option<Value>,
security_baseline: Option<Value>,
is_default: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<OrgTemplate, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn delete_org_template<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_template<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
org_id: Option<Uuid>,
name: &'life1 str,
slug: &'life2 str,
description: &'life3 str,
author_id: Uuid,
version: &'life4 str,
category: TemplateCategory,
content_json: Value,
) -> Pin<Box<dyn Future<Output = Result<Template, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_template_by_name_version<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
version: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Template>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_templates_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Template>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn search_templates<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: Option<&'life1 str>,
category: Option<&'life2 str>,
tags: &'life3 [String],
org_id: Option<Uuid>,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Template>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_search_templates<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: Option<&'life1 str>,
category: Option<&'life2 str>,
tags: &'life3 [String],
org_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_scenario<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
org_id: Option<Uuid>,
name: &'life1 str,
slug: &'life2 str,
description: &'life3 str,
author_id: Uuid,
current_version: &'life4 str,
category: &'life5 str,
license: &'life6 str,
manifest_json: Value,
) -> Pin<Box<dyn Future<Output = Result<Scenario, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_scenario_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Scenario>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn find_scenario_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Scenario>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_scenario_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Scenario>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a scenario by UUID, regardless of org scoping. Callers that
care about org access control must check
scenario.org_id themselves.fn list_scenarios_by_org<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Scenario>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn search_scenarios<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
query: Option<&'life1 str>,
category: Option<&'life2 str>,
tags: &'life3 [String],
org_id: Option<Uuid>,
sort: &'life4 str,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Scenario>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_search_scenarios<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: Option<&'life1 str>,
category: Option<&'life2 str>,
tags: &'life3 [String],
org_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn search_plugins<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
query: Option<&'life1 str>,
category: Option<&'life2 str>,
language: Option<&'life3 str>,
tags: &'life4 [String],
sort_by: &'life5 str,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Plugin>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_search_plugins<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
query: Option<&'life1 str>,
category: Option<&'life2 str>,
language: Option<&'life3 str>,
tags: &'life4 [String],
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_plugin_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Plugin>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_plugin<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'async_trait>(
&'life0 self,
name: &'life1 str,
description: &'life2 str,
version: &'life3 str,
category: &'life4 str,
license: &'life5 str,
repository: Option<&'life6 str>,
homepage: Option<&'life7 str>,
author_id: Uuid,
language: &'life8 str,
) -> Pin<Box<dyn Future<Output = Result<Plugin, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_plugin_versions<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<PluginVersion>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_plugin_version<'life0, 'life1, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<PluginVersion>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_plugin_version<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
version: &'life1 str,
download_url: &'life2 str,
checksum: &'life3 str,
file_size: i64,
min_mockforge_version: Option<&'life4 str>,
sbom_json: Option<&'life5 Value>,
) -> Pin<Box<dyn Future<Output = Result<PluginVersion, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn get_plugin_version_sbom<'life0, 'async_trait>(
&'life0 self,
plugin_version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_plugin_version_sbom<'life0, 'async_trait>(
&'life0 self,
plugin_version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Fetch the SBOM (CycloneDX JSON or similar) stored alongside a
plugin version at publish time. Returns
None when the version
predates SBOM support or the publisher didn’t include one.fn yank_plugin_version<'life0, 'async_trait>(
&'life0 self,
version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_plugin_version_dependencies<'life0, 'async_trait>(
&'life0 self,
version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn add_plugin_version_dependency<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
version_id: Uuid,
plugin_name: &'life1 str,
version_req: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn upsert_plugin_security_scan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
plugin_version_id: Uuid,
status: &'life1 str,
score: i16,
findings: &'life2 Value,
scanner_version: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn upsert_plugin_security_scan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
plugin_version_id: Uuid,
status: &'life1 str,
score: i16,
findings: &'life2 Value,
scanner_version: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
Upsert a security scan result for a specific plugin version. Each
version has at most one row (latest scan wins).
Source§fn latest_security_scan_for_plugin<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<PluginSecurityScan>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn latest_security_scan_for_plugin<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<PluginSecurityScan>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Fetch the latest security scan for a plugin’s current version.
Source§fn list_pending_security_scans<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingScanJob>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_pending_security_scans<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingScanJob>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
List up to
limit pending security scans with enough context
(plugin name + version + declared file size) for a worker to
re-download the artifact and run checks.Source§fn find_osv_matches<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ecosystem: &'life1 str,
package_name: &'life2 str,
version: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<OsvMatch>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_osv_matches<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ecosystem: &'life1 str,
package_name: &'life2 str,
version: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<OsvMatch>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
Find cached OSV advisories that affect this specific
(ecosystem, name, version). Returns an empty vec when the cache
has no hit — the caller should treat that as “clean”, not “error”.Source§fn upsert_osv_advisory<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 OsvImportRecord,
) -> Pin<Box<dyn Future<Output = Result<usize, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn upsert_osv_advisory<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 OsvImportRecord,
) -> Pin<Box<dyn Future<Output = Result<usize, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Import a single OSV advisory record. Idempotent — the
(advisory_id, ecosystem, package_name) uniqueness constraint
means repeat imports just refresh modified_at and
affected_versions. Returns the number of (ecosystem, package)
rows the import landed into (an advisory can cover several
packages; each lands as its own row).Source§fn count_osv_advisories<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_osv_advisories<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Count rows in the OSV cache. Used by the scanner to decide whether
to fall back to the hardcoded seed list — an empty cache means the
sync worker hasn’t run yet, so a fresh install should still surface
findings against a built-in baseline rather than returning silence.
Source§fn list_user_public_keys<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserPublicKey>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_user_public_keys<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserPublicKey>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
List every non-revoked public key registered against a user. The
attestation verifier tries each one at publish time.
Source§fn list_user_public_keys_with_usage<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
include_revoked: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserPublicKeyWithUsage>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_user_public_keys_with_usage<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
include_revoked: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserPublicKeyWithUsage>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
List a user’s keys for the user-facing settings page. Unlike
Self::list_user_public_keys (which is the verifier hot path
and only ever returns active keys), this variant: Read moreSource§fn create_user_public_key<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: Uuid,
algorithm: &'life1 str,
public_key_b64: &'life2 str,
label: &'life3 str,
org_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<UserPublicKey, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_user_public_key<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: Uuid,
algorithm: &'life1 str,
public_key_b64: &'life2 str,
label: &'life3 str,
org_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<UserPublicKey, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
Register a new public key on a user’s account. The caller has
already validated that
public_key_b64 decodes to the right
length for the algorithm. org_id is Some when the key is
scoped to an organization (caller must be an Owner/Admin of that
org — handler-level check). Returns the persisted record.Source§fn find_user_public_key_by_id<'life0, 'async_trait>(
&'life0 self,
key_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<UserPublicKey>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_user_public_key_by_id<'life0, 'async_trait>(
&'life0 self,
key_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<UserPublicKey>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a single key by id, regardless of owner. Used by the
revoke handler to resolve an org-scoped revoke when the caller
isn’t the key’s owner but is an org admin.
Source§fn revoke_org_public_key<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
key_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn revoke_org_public_key<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
key_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Soft-revoke a key on behalf of an org Owner/Admin. The handler is
responsible for verifying the caller’s role; this method only
guards on the key actually being scoped to the supplied org.
Returns
true if a row updated.Source§fn list_org_public_keys_with_usage<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
include_revoked: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserPublicKeyWithUsage>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_org_public_keys_with_usage<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
include_revoked: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserPublicKeyWithUsage>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
List keys tagged with
org_id. Mirrors
Self::list_user_public_keys_with_usage for the org listing
endpoint — joins usage and respects include_revoked.Source§fn list_keys_for_publisher<'life0, 'async_trait>(
&'life0 self,
author_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserPublicKey>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_keys_for_publisher<'life0, 'async_trait>(
&'life0 self,
author_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserPublicKey>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Pull every active key the verifier should try when
author_id
publishes — i.e. the author’s own keys plus any keys tagged with
orgs the author is a member of. Single round-trip.Source§fn rotate_user_public_key<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: Uuid,
old_key_id: Uuid,
algorithm: &'life1 str,
new_public_key_b64: &'life2 str,
new_label: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<UserPublicKey, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
fn rotate_user_public_key<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: Uuid,
old_key_id: Uuid,
algorithm: &'life1 str,
new_public_key_b64: &'life2 str,
new_label: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<UserPublicKey, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
Atomic publisher-key rotation: register a new key with the same
org tag as
old_key_id and revoke the old one in one
transaction. Returns the new key. Callers (handler) audit-log
the rotation as a single event.Source§fn revoke_user_public_key<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
key_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn revoke_user_public_key<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
key_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Soft-revoke a key (sets
revoked_at). Revoked keys are skipped
by the attestation verifier but stay in the table so historical
signatures stay traceable. Returns true if a row was actually
updated, so the handler can distinguish “not yours” (or “already
revoked”) from “done.”Source§fn record_plugin_version_attestation<'life0, 'async_trait>(
&'life0 self,
plugin_version_id: Uuid,
key_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn record_plugin_version_attestation<'life0, 'async_trait>(
&'life0 self,
plugin_version_id: Uuid,
key_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Record a verified SBOM attestation against a plugin version. No-op
when
key_id is None (publisher didn’t submit a signature).Source§fn get_plugin_version_attestation<'life0, 'async_trait>(
&'life0 self,
plugin_version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<(Uuid, DateTime<Utc>)>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_plugin_version_attestation<'life0, 'async_trait>(
&'life0 self,
plugin_version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<(Uuid, DateTime<Utc>)>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Fetch a stored attestation pointer for the scanner worker. Returns
the verifying key id + signed-at timestamp, or
None when the
version wasn’t signed.fn get_plugin_reviews<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Review>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_plugin_reviews<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_plugin_review<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
user_id: Uuid,
version: &'life1 str,
rating: i16,
title: Option<&'life2 str>,
comment: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Review, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn get_plugin_review_stats<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(f64, i64), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_plugin_review_stats<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(f64, i64), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Returns (average_rating, total_reviews) for a plugin.
Source§fn get_plugin_review_distribution<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<HashMap<i16, i64>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_plugin_review_distribution<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<HashMap<i16, i64>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Returns map of rating -> count for a plugin.
fn find_existing_plugin_review<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Uuid>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_plugin_rating_stats<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
avg: f64,
count: i32,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn increment_plugin_review_vote<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
review_id: Uuid,
helpful: bool,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn increment_plugin_download<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
plugin_version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn increment_plugin_download<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
plugin_version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Increment both
plugins.downloads_total and
plugin_versions.downloads. Called by the tracked-download endpoint
before redirecting to the artifact URL.Source§fn take_down_plugin<'life0, 'life1, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
reason: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn take_down_plugin<'life0, 'life1, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
reason: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Set / clear the takedown columns.
reason is preserved on the row
so admins can audit moderation history.fn restore_plugin<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn list_taken_down_plugins<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Plugin>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_taken_down_plugins<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Plugin>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
All currently taken-down plugins, newest takedown first. Powers
the admin moderation page; the public search excludes these so
this is the only programmatic way to enumerate them.
Source§fn find_review_in_plugin<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
review_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Review>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_review_in_plugin<'life0, 'async_trait>(
&'life0 self,
plugin_id: Uuid,
review_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Review>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Look up a single review by id, scoped to the plugin path param so the
author-response endpoint can return 404 (not 403) when the path/body
disagree.
Set or clear the author response on a review. None clears both
columns so authors can retract a response.
Source§fn get_user_public_info<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<(String, String)>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_user_public_info<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<(String, String)>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Lookup (id, username) for a user.
fn get_template_reviews<'life0, 'async_trait>(
&'life0 self,
template_id: Uuid,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<TemplateReview>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_template_reviews<'life0, 'async_trait>(
&'life0 self,
template_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_template_review<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
template_id: Uuid,
reviewer_id: Uuid,
rating: i32,
title: Option<&'life1 str>,
comment: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<TemplateReview, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_template_review_stats<'life0, 'async_trait>(
&'life0 self,
template_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_existing_template_review<'life0, 'async_trait>(
&'life0 self,
template_id: Uuid,
reviewer_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Uuid>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn toggle_template_star<'life0, 'async_trait>(
&'life0 self,
template_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(bool, i64), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn toggle_template_star<'life0, 'async_trait>(
&'life0 self,
template_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(bool, i64), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Toggle a template star for a user.
Returns
(now_starred, new_count).Source§fn is_template_starred_by<'life0, 'async_trait>(
&'life0 self,
template_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn is_template_starred_by<'life0, 'async_trait>(
&'life0 self,
template_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Whether
user_id has starred template_id.Source§fn count_template_stars<'life0, 'async_trait>(
&'life0 self,
template_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_template_stars<'life0, 'async_trait>(
&'life0 self,
template_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Live star count for a single template.
Source§fn count_template_stars_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
template_ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<HashMap<Uuid, i64>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_template_stars_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
template_ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<HashMap<Uuid, i64>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Batch-fetch star counts for many templates in a single query.
Templates with zero stars are absent from the map — callers default to 0.
fn get_scenario_reviews<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScenarioReview>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_scenario_reviews<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn create_scenario_review<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
reviewer_id: Uuid,
rating: i32,
title: Option<&'life1 str>,
comment: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ScenarioReview, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PgRegistryStore: 'async_trait,
fn update_scenario_review_stats<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn find_existing_scenario_review<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
reviewer_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Uuid>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn increment_scenario_review_helpful_count<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
review_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn increment_scenario_review_helpful_count<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
review_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Fire-and-forget increment of a review’s helpful counter. Mirrors the
plugin equivalent — no per-user vote tracking; the UI is responsible
for not letting a user click “helpful” twice in a row.
Source§fn toggle_scenario_star<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(bool, i64), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn toggle_scenario_star<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(bool, i64), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Toggle a scenario star for a user.
Returns
(now_starred, new_count).Source§fn is_scenario_starred_by<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn is_scenario_starred_by<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Whether
user_id has starred scenario_id.Source§fn count_scenario_stars<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_scenario_stars<'life0, 'async_trait>(
&'life0 self,
scenario_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Live star count for a single scenario.
Source§fn count_scenario_stars_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
scenario_ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<HashMap<Uuid, i64>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn count_scenario_stars_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
scenario_ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<HashMap<Uuid, i64>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Batch-fetch star counts for many scenarios in a single query.
Scenarios with zero stars are absent from the map — callers default to 0.
Source§fn yank_scenario_version<'life0, 'async_trait>(
&'life0 self,
version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn yank_scenario_version<'life0, 'async_trait>(
&'life0 self,
version_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Mark a scenario version as yanked. The version row stays in the DB so
download URLs continue to resolve for users who pinned to it, but
search/list paths filter out yanked versions.
Source§fn get_admin_analytics_snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AdminAnalyticsSnapshot, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_admin_analytics_snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<AdminAnalyticsSnapshot, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Fetch a single aggregated snapshot covering every metric surfaced by
the admin analytics dashboard. Encapsulates ~40 raw SQL queries so
handlers stay thin and SQLite implementations can specialize.
Source§fn get_conversion_funnel_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
interval: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ConversionFunnelSnapshot, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_conversion_funnel_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
interval: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ConversionFunnelSnapshot, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PgRegistryStore: 'async_trait,
Fetch conversion funnel counts for the given textual Postgres interval
(e.g. “7 days”, “30 days”). SQLite implementations may parse this.
fn list_user_settings_raw<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserSettingRow>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_user_api_tokens<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<ApiToken>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn get_org_membership_role<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_org_settings_raw<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<OrgSettingRow>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_org_projects_raw<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<ProjectRow>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_org_subscriptions_raw<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<SubscriptionRow>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn list_org_hosted_mocks_raw<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<HostedMock>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Source§fn delete_user_data_cascade<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<usize, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
fn delete_user_data_cascade<'life0, 'async_trait>(
&'life0 self,
user_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<usize, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PgRegistryStore: 'async_trait,
Transactionally erase a user’s personal data (GDPR right to erasure),
transferring solo-owned orgs with other members to the next admin and
cascade-deleting orgs with no remaining members. Returns the number of
owned organizations affected (for audit logging).
Auto Trait Implementations§
impl Freeze for PgRegistryStore
impl !RefUnwindSafe for PgRegistryStore
impl Send for PgRegistryStore
impl Sync for PgRegistryStore
impl Unpin for PgRegistryStore
impl UnsafeUnpin for PgRegistryStore
impl !UnwindSafe for PgRegistryStore
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.