pub trait IdentityProviderAdapter:
Debug
+ Send
+ Sync {
Show 23 methods
// Required methods
fn create_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
opts: CreateIdentityOptions<'life1>,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn read_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
) -> Pin<Box<dyn Future<Output = ClResult<Option<Identity>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn read_identity_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<Option<Identity>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
opts: UpdateIdentityOptions,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_identity_address<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
address: &'life3 str,
address_type: AddressType,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn delete_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn list_identities<'life0, 'async_trait>(
&'life0 self,
opts: ListIdentityOptions,
) -> Pin<Box<dyn Future<Output = ClResult<Vec<Identity>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn cleanup_expired_identities<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ClResult<u32>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn renew_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
new_expires_at: Timestamp,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn create_api_key<'life0, 'life1, 'async_trait>(
&'life0 self,
opts: CreateApiKeyOptions<'life1>,
) -> Pin<Box<dyn Future<Output = ClResult<CreatedApiKey>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn verify_api_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_api_keys<'life0, 'async_trait>(
&'life0 self,
opts: ListApiKeyOptions,
) -> Pin<Box<dyn Future<Output = ClResult<Vec<ApiKey>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_api_key<'life0, 'async_trait>(
&'life0 self,
id: i32,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_api_key_for_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: i32,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
) -> Pin<Box<dyn Future<Output = ClResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn cleanup_expired_api_keys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ClResult<u32>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_identities_by_registrar<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
limit: Option<u32>,
offset: Option<u32>,
) -> Pin<Box<dyn Future<Output = ClResult<Vec<Identity>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn set_quota_limits<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
max_identities: i32,
max_storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn check_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn increment_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn decrement_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_quota_on_status_change<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
old_status: IdentityStatus,
new_status: IdentityStatus,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn identity_exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
) -> Pin<Box<dyn Future<Output = ClResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
A Cloudillo identity provider adapter
Every IdentityProviderAdapter implementation is required to implement this trait.
An IdentityProviderAdapter is responsible for managing identity registrations
and handling DNS modifications for identity registration.
Required Methods§
Sourcefn create_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
opts: CreateIdentityOptions<'life1>,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
opts: CreateIdentityOptions<'life1>,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a new identity registration
This method registers a new identity with the given id_tag and email address. It should also handle any necessary DNS modifications for the identity.
§Arguments
opts- Options containing id_tag, email, and optional expiration
§Returns
The newly created Identity with all timestamps populated
§Errors
Returns an error if:
- The id_tag already exists
- The email is invalid or already in use
- DNS modifications fail
Sourcefn read_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
) -> Pin<Box<dyn Future<Output = ClResult<Option<Identity>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
) -> Pin<Box<dyn Future<Output = ClResult<Option<Identity>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn read_identity_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<Option<Identity>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_identity_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<Option<Identity>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn update_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
opts: UpdateIdentityOptions,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
opts: UpdateIdentityOptions,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn update_identity_address<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
address: &'life3 str,
address_type: AddressType,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn update_identity_address<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
address: &'life3 str,
address_type: AddressType,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Updates only the address of an identity (optimized for performance)
This method is optimized for updating just the address and address type, avoiding unnecessary updates to other fields. Useful for frequent address updates.
§Arguments
id_tag- The identifier of the identity to updateaddress- The new address to setaddress_type- The type of the address (IPv4, IPv6, or Hostname)
§Returns
The updated Identity with the new address
§Errors
Returns an error if the identity doesn’t exist or the update fails
Sourcefn delete_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn list_identities<'life0, 'async_trait>(
&'life0 self,
opts: ListIdentityOptions,
) -> Pin<Box<dyn Future<Output = ClResult<Vec<Identity>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_identities<'life0, 'async_trait>(
&'life0 self,
opts: ListIdentityOptions,
) -> Pin<Box<dyn Future<Output = ClResult<Vec<Identity>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn cleanup_expired_identities<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ClResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cleanup_expired_identities<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ClResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cleans up expired identities
This method should be called periodically to remove identities that have expired. It should also clean up any associated DNS records.
§Returns
The number of identities that were cleaned up
Sourcefn renew_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
new_expires_at: Timestamp,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn renew_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
new_expires_at: Timestamp,
) -> Pin<Box<dyn Future<Output = ClResult<Identity>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn create_api_key<'life0, 'life1, 'async_trait>(
&'life0 self,
opts: CreateApiKeyOptions<'life1>,
) -> Pin<Box<dyn Future<Output = ClResult<CreatedApiKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_api_key<'life0, 'life1, 'async_trait>(
&'life0 self,
opts: CreateApiKeyOptions<'life1>,
) -> Pin<Box<dyn Future<Output = ClResult<CreatedApiKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a new API key for an identity
Returns the created API key with the plaintext key (shown only once)
Sourcefn verify_api_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify_api_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Verifies an API key and returns the associated identity if valid
Returns None if the key is invalid or expired Updates the last_used_at timestamp on successful verification
§Security Note
Implementations MUST reject identities with the prefix ‘cl-o’ as it is reserved and should not be allowed to authenticate via API keys.
Sourcefn list_api_keys<'life0, 'async_trait>(
&'life0 self,
opts: ListApiKeyOptions,
) -> Pin<Box<dyn Future<Output = ClResult<Vec<ApiKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_api_keys<'life0, 'async_trait>(
&'life0 self,
opts: ListApiKeyOptions,
) -> Pin<Box<dyn Future<Output = ClResult<Vec<ApiKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists API keys with optional filtering
Note: Only returns metadata, not the actual keys
Sourcefn delete_api_key<'life0, 'async_trait>(
&'life0 self,
id: i32,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_api_key<'life0, 'async_trait>(
&'life0 self,
id: i32,
) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deletes an API key by ID
Sourcefn delete_api_key_for_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: i32,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
) -> Pin<Box<dyn Future<Output = ClResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_api_key_for_identity<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: i32,
id_tag_prefix: &'life1 str,
id_tag_domain: &'life2 str,
) -> Pin<Box<dyn Future<Output = ClResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deletes an API key by ID, ensuring it belongs to the specified identity
Returns true if a key was deleted, false if no matching key was found
Sourcefn cleanup_expired_api_keys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ClResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cleanup_expired_api_keys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ClResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cleans up expired API keys
Returns the number of keys deleted
Sourcefn list_identities_by_registrar<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
limit: Option<u32>,
offset: Option<u32>,
) -> Pin<Box<dyn Future<Output = ClResult<Vec<Identity>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_identities_by_registrar<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
limit: Option<u32>,
offset: Option<u32>,
) -> Pin<Box<dyn Future<Output = ClResult<Vec<Identity>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn get_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn set_quota_limits<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
max_identities: i32,
max_storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_quota_limits<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
max_identities: i32,
max_storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn check_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn increment_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn increment_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn decrement_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn decrement_quota<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
storage_bytes: i64,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn update_quota_on_status_change<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
old_status: IdentityStatus,
new_status: IdentityStatus,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_quota_on_status_change<'life0, 'life1, 'async_trait>(
&'life0 self,
registrar_id_tag: &'life1 str,
old_status: IdentityStatus,
new_status: IdentityStatus,
) -> Pin<Box<dyn Future<Output = ClResult<RegistrarQuota>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates quota counts when an identity changes status
Used when an identity is activated, suspended, or deleted to adjust quota tracking.
§Arguments
registrar_id_tag- The registrar’s id_tagold_status- The identity’s previous statusnew_status- The identity’s new status
§Errors
Returns an error if the quota doesn’t exist or update fails