Skip to main content

MetaAdapter

Trait MetaAdapter 

Source
pub trait MetaAdapter:
    Debug
    + Send
    + Sync {
Show 142 methods // Required methods fn read_tenant<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Tenant<Box<str>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_tenant<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<TnId>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_tenant<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, tenant: &'life1 UpdateTenantData, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_tenant<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_tenants<'life0, 'life1, 'async_trait>( &'life0 self, opts: &'life1 ListTenantsMetaOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<TenantListMeta>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_profiles<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListProfileOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Profile<Box<str>>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_follower_tags<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Box<str>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_relationships<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, target_id_tags: &'life1 [&'life2 str], ) -> Pin<Box<dyn Future<Output = ClResult<HashMap<String, (bool, bool)>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn read_profile<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<(Box<str>, Profile<Box<str>>)>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn read_profiles<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tags: &'life1 [&'life2 str], ) -> Pin<Box<dyn Future<Output = ClResult<Vec<PublicProfileRow>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn read_profile_roles<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Box<[Box<str>]>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn upsert_profile<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, fields: &'life2 UpsertProfileFields, ) -> Pin<Box<dyn Future<Output = ClResult<UpsertResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn read_profile_public_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id_tag: &'life1 str, key_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<(Box<str>, Timestamp)>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn add_profile_public_key<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id_tag: &'life1 str, key_id: &'life2 str, public_key: &'life3 str, expires_at: Option<Timestamp>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn list_stale_profiles<'life0, 'async_trait>( &'life0 self, max_age_secs: i64, disable_after_secs: i64, limit: u32, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<(TnId, Box<str>, Option<Box<str>>)>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_action_id<'life0, 'async_trait>( &'life0 self, tn_id: TnId, a_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_actions<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListActionOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<ActionView>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_action_tokens<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListActionOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Box<[Box<str>]>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn count_actions_grouped<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListActionOptions, group_by: ActionCountGroupBy, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<(Option<String>, i64)>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn count_actions<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListActionOptions, ) -> Pin<Box<dyn Future<Output = ClResult<i64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn set_read_marker<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, scope: &'life1 str, key: &'life2 str, position: i64, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn auto_track_action<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_action<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, tn_id: TnId, action: &'life1 Action<&'life2 str>, key: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = ClResult<ActionId<Box<str>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn finalize_action<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, a_id: u64, action_id: &'life1 str, options: FinalizeActionOptions<'life2>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn create_inbound_action<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, token: &'life2 str, ack_token: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn get_action_root_id<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_action_data<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<ActionData>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_action_by_key<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_key: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Action<Box<str>>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn store_action_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, token: &'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 get_action_token<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Box<str>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_action_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, opts: &'life2 UpdateActionDataOptions, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn update_inbound_action<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, status: Option<char>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_related_action_tokens<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, aprv_action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<(Box<str>, Box<str>)>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_file_id<'life0, 'async_trait>( &'life0 self, tn_id: TnId, f_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_files<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListFileOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<FileView>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_file_variants<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, file_id: FileId<&'life1 str>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<FileVariant<Box<str>>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_available_variants<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Box<str>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_referenced_variant_ids<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Box<str>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn is_variant_referenced<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, variant_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn read_file_variant<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, variant_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<FileVariant<Box<str>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn read_file_id_by_variant<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, variant_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn read_f_id_by_file_id<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<u64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_file<'life0, 'async_trait>( &'life0 self, tn_id: TnId, opts: CreateFile, ) -> Pin<Box<dyn Future<Output = ClResult<FileId<Box<str>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_file_variant<'a, 'async_trait>( &'a self, tn_id: TnId, f_id: u64, opts: FileVariant<&'a str>, ) -> Pin<Box<dyn Future<Output = ClResult<&'a str>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait; fn update_file_id<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, f_id: u64, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn finalize_file<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, f_id: u64, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_files_by_parent<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, parent_id: &'life1 str, before: Timestamp, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<u64>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_referenced_managed_fids<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<HashSet<u64>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn hard_delete_file<'life0, 'async_trait>( &'life0 self, tn_id: TnId, f_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Box<str>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_tasks<'life0, 'async_trait>( &'life0 self, opts: ListTaskOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Task>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_task_ids<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, kind: &'life1 str, keys: &'life2 [Box<str>], ) -> Pin<Box<dyn Future<Output = ClResult<Vec<u64>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn create_task<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, kind: &'static str, key: Option<&'life1 str>, input: &'life2 str, deps: &'life3 [u64], ) -> Pin<Box<dyn Future<Output = ClResult<u64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn update_task_finished<'life0, 'life1, 'async_trait>( &'life0 self, task_id: u64, output: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_task_error<'life0, 'life1, 'async_trait>( &'life0 self, task_id: u64, output: &'life1 str, next_at: Option<Timestamp>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn find_task_by_key<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Task>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_task<'life0, 'life1, 'async_trait>( &'life0 self, task_id: u64, patch: &'life1 TaskPatch, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn find_completed_deps<'life0, 'life1, 'async_trait>( &'life0 self, deps: &'life1 [u64], ) -> Pin<Box<dyn Future<Output = ClResult<Vec<u64>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_profile_info<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<ProfileData>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_action<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<ActionView>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_action_type<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Box<str>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_action<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, content: Option<&'life2 str>, attachments: Option<&'life3 [&'life4 str]>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn delete_action<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_file<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<DeleteFileResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_settings<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, prefix: Option<&'life1 [String]>, ) -> Pin<Box<dyn Future<Output = ClResult<HashMap<String, Value>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn read_setting<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Value>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_setting<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, value: Option<Value>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_refs<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListRefsOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<RefData>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_ref<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ref_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<RefData>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_ref<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, ref_id: &'life1 str, opts: &'life2 CreateRefOptions, ) -> Pin<Box<dyn Future<Output = ClResult<RefData>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn delete_ref<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ref_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_ref<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, ref_id: &'life1 str, opts: &'life2 UpdateRefOptions, ) -> Pin<Box<dyn Future<Output = ClResult<RefData>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn use_ref<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ref_id: &'life1 str, expected_types: &'life2 [&'life3 str], ) -> Pin<Box<dyn Future<Output = ClResult<(TnId, Box<str>, RefData)>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn validate_ref<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ref_id: &'life1 str, expected_types: &'life2 [&'life3 str], ) -> Pin<Box<dyn Future<Output = ClResult<(TnId, Box<str>, RefData)>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn list_tags<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, prefix: Option<&'life1 str>, with_counts: bool, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<TagInfo>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn add_tag<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, tag: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn remove_tag<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, tag: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn update_file_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, opts: &'life2 UpdateFileOptions, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn read_file<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<FileView>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn read_file_with_user_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, id_tag: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<FileView>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn record_file_access<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, file_id: &'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 record_file_modification<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, file_id: &'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 update_file_user_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, file_id: &'life2 str, pinned: Patch<bool>, starred: Patch<bool>, access_level: Patch<char>, ) -> Pin<Box<dyn Future<Output = ClResult<FileUserData>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn get_file_user_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, file_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<FileUserData>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn list_push_subscriptions<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<PushSubscription>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_push_subscription<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, subscription: &'life1 PushSubscriptionData, ) -> Pin<Box<dyn Future<Output = ClResult<u64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_push_subscription<'life0, 'async_trait>( &'life0 self, tn_id: TnId, subscription_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn create_share_entry<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, tn_id: TnId, resource_type: char, resource_id: &'life1 str, created_by: &'life2 str, entry: &'life3 CreateShareEntry, ) -> Pin<Box<dyn Future<Output = ClResult<ShareEntry>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn delete_share_entry<'life0, 'async_trait>( &'life0 self, tn_id: TnId, id: i64, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_share_entry<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id: i64, resource_type: char, resource_id: &'life1 str, opts: &'life2 UpdateShareEntryOptions, ) -> Pin<Box<dyn Future<Output = ClResult<ShareEntry>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn list_share_entries<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, resource_type: char, resource_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<ShareEntry>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_share_entries_by_subject<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, subject_type: Option<char>, subject_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<ShareEntry>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn check_share_access<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, resource_type: char, resource_id: &'life1 str, subject_type: char, subject_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<char>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn read_share_entry<'life0, 'async_trait>( &'life0 self, tn_id: TnId, id: i64, ) -> Pin<Box<dyn Future<Output = ClResult<Option<ShareEntry>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn install_app<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, install: &'life1 InstallApp, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn uninstall_app<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, app_name: &'life1 str, publisher_tag: &'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_installed_apps<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, search: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<InstalledApp>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_installed_app<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, app_name: &'life1 str, publisher_tag: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<InstalledApp>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn replace_search_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, tn_id: TnId, obj: &'life1 SearchObject<'life2>, parts: &'life3 [SearchPart<'life4>], ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn replace_search_row<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, tn_id: TnId, obj_tp: char, obj_id: &'life1 str, part: Option<&'life2 SearchPart<'life3>>, fts_cl: bool, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn delete_search_object<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, obj_tp: char, obj_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_deep_search_by_content_type<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, content_type: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn reap_search_orphans<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn search<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 SearchOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<SearchRow>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn count_search<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 SearchOptions, ) -> Pin<Box<dyn Future<Output = ClResult<i64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn read_tenant_data<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Box<str>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn write_tenant_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, value: Option<&'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 read_doc_format<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, content_type: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<DocFormat>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_doc_formats<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<DocFormat>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn upsert_doc_format<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, fmt: &'life1 UpsertDocFormat<'life2>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn delete_doc_format<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, content_type: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_address_book<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, description: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = ClResult<AddressBook>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn list_address_books<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<AddressBook>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_address_book<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<Option<AddressBook>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_address_book_by_name<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<AddressBook>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_address_book<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, patch: &'life1 UpdateAddressBookData, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_address_book<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_contacts<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: Option<u64>, opts: &'life1 ListContactOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<ContactView>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_contact<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, uid: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Contact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn upsert_contact<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, uid: &'life1 str, vcard: &'life2 str, etag: &'life3 str, extracted: &'life4 ContactExtracted, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn delete_contact<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, uid: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_contacts_by_uids<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, uids: &'life1 [&'life2 str], ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Contact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn list_contacts_since<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, since: Option<Timestamp>, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<ContactSyncEntry>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_contacts_by_profile<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, profile_id_tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Contact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_calendar<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, input: &'life1 CreateCalendarData, ) -> Pin<Box<dyn Future<Output = ClResult<Calendar>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_calendars<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Calendar>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_calendar<'life0, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Calendar>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_calendar_by_name<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Calendar>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_calendar<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, patch: &'life1 UpdateCalendarData, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_calendar<'life0, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_calendar_objects<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, opts: &'life1 ListCalendarObjectOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<CalendarObjectView>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_calendar_object<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<CalendarObject>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_calendar_object_override<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, recurrence_id: Timestamp, ) -> Pin<Box<dyn Future<Output = ClResult<Option<CalendarObject>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_calendar_object_overrides<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<CalendarObject>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_calendar_object_override<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, recurrence_id: Timestamp, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn upsert_calendar_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, ical: &'life2 str, etag: &'life3 str, extracted: &'life4 CalendarObjectExtracted, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn delete_calendar_object<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn split_calendar_object_series<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, master: CalendarObjectWrite<'life1>, tail: CalendarObjectWrite<'life2>, split_at: Timestamp, ) -> Pin<Box<dyn Future<Output = ClResult<(Box<str>, Box<str>)>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn get_calendar_objects_by_uids<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uids: &'life1 [&'life2 str], ) -> Pin<Box<dyn Future<Output = ClResult<Vec<CalendarObject>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn list_calendar_objects_since<'life0, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, since: Option<Timestamp>, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<CalendarObjectSyncEntry>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn query_calendar_objects_in_range<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, component: Option<&'life1 str>, start: Option<Timestamp>, end: Option<Timestamp>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<CalendarObject>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; // Provided methods fn optimize_search_index<'life0, 'async_trait>( &'life0 self, full: bool, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn reclaim_space<'life0, 'async_trait>( &'life0 self, min_free_pct: i64, ) -> Pin<Box<dyn Future<Output = ClResult<SpaceReport>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... }
}

Required Methods§

Source

fn read_tenant<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Tenant<Box<str>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads a tenant profile

Source

fn create_tenant<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<TnId>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Creates a new tenant

Source

fn update_tenant<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, tenant: &'life1 UpdateTenantData, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Updates a tenant

Source

fn delete_tenant<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Deletes a tenant

Source

fn list_tenants<'life0, 'life1, 'async_trait>( &'life0 self, opts: &'life1 ListTenantsMetaOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<TenantListMeta>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lists all tenants (for admin use)

Source

fn list_profiles<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListProfileOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Profile<Box<str>>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lists all profiles matching a set of options

Source

fn list_follower_tags<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Box<str>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List the id_tags of every profile that follows this tenant (i.e. should receive its broadcasts). This is the broadcast/Announce recipient set: profiles with follower = true, excluding Suspended/Blocked/Banned issuers. Unbounded (no LIMIT) — unlike list_profiles.

Source

fn get_relationships<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, target_id_tags: &'life1 [&'life2 str], ) -> Pin<Box<dyn Future<Output = ClResult<HashMap<String, (bool, bool)>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get relationships between the current user and multiple target profiles

Efficiently queries relationship status (following, connected) for multiple profiles in a single database call, avoiding N+1 query patterns.

Returns: HashMap<target_id_tag, (following: bool, connected: bool)>

Keys are the id_tags in target_id_tags, verbatim — an implementation that canonicalises id_tags for storage (id_tags are case-insensitive DNS names) still keys the result by what the caller passed in, so a mixed-case needle can be looked back up. Targets with no mirrored profile are absent.

Source

fn read_profile<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<(Box<str>, Profile<Box<str>>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reads a profile

Returns an (etag, Profile) tuple.

Source

fn read_profiles<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tags: &'life1 [&'life2 str], ) -> Pin<Box<dyn Future<Output = ClResult<Vec<PublicProfileRow>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Batch sibling of Self::read_profile, reduced to the public projection.

Unknown / not-mirrored id_tags are omitted from the result rather than reported, and order is unspecified — callers key by id_tag. A row whose type is NULL or unrecognised is likewise omitted: it is a never-synced relationship stub with no name and no picture, so it has nothing to contribute to this projection.

Implementations MUST chunk internally: callers are not required to cap id_tags, and no caller-side cap is part of this contract.

Source

fn read_profile_roles<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Box<[Box<str>]>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read profile roles for access token generation

Source

fn upsert_profile<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, fields: &'life2 UpsertProfileFields, ) -> Pin<Box<dyn Future<Output = ClResult<UpsertResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Insert a profile row if missing, otherwise update it.

Returns UpsertResult::Created if the row was inserted, or UpsertResult::Updated if an existing row was updated. Never returns Error::Conflict or Error::NotFound — the operation is idempotent with respect to row existence.

Source

fn read_profile_public_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id_tag: &'life1 str, key_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<(Box<str>, Timestamp)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Reads the public key of a profile

Returns a (public key, expiration) tuple.

Source

fn add_profile_public_key<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id_tag: &'life1 str, key_id: &'life2 str, public_key: &'life3 str, expires_at: Option<Timestamp>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Cache a federated profile public key.

expires_at is the owner-declared key expiration from the remote profile. None means the owner did not declare an expiration; the implementation may store it as NULL (treated as “never expires” by read_profile_public_key).

Source

fn list_stale_profiles<'life0, 'async_trait>( &'life0 self, max_age_secs: i64, disable_after_secs: i64, limit: u32, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<(TnId, Box<str>, Option<Box<str>>)>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List stale profiles that need refreshing

Returns profiles where:

  • synced_at IS NULL (never synced — always eligible), OR
  • synced_at < now - max_age_secs AND synced_at >= now - disable_after_secs (stale but not yet abandoned).

Profiles with synced_at < now - disable_after_secs are excluded so the refresh batch stops attempting persistently failing remotes. Returns Vec<(tn_id, id_tag, etag)> tuples for conditional refresh requests.

Source

fn get_action_id<'life0, 'async_trait>( &'life0 self, tn_id: TnId, a_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_actions<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListActionOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<ActionView>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn list_action_tokens<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListActionOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Box<[Box<str>]>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn count_actions_grouped<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListActionOptions, group_by: ActionCountGroupBy, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<(Option<String>, i64)>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count actions matching opts, grouped by group_by. Returns (group_value, count) pairs (group value NULL-able). Used to derive per-reaction-type counts without baking reaction semantics into the adapter.

Source

fn count_actions<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListActionOptions, ) -> Pin<Box<dyn Future<Output = ClResult<i64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count actions matching opts (same filters as list_actions), no limit/sort/cursor. Backs the count=true flag on GET /actions. When opts.visibility_guard is set (Null guest / Value viewer) the count is post-visibility, applying the same ABAC translation of can_view_item the row-list pass uses. Undefined (default) counts every matching row.

Source

fn set_read_marker<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, scope: &'life1 str, key: &'life2 str, position: i64, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Set a read-watermark, forward-only (a lower position is a no-op). Dispatches by scope, all against the reader’s own (tn_id) node:

  • "feed"profiles.feed_read_at for id_tag = key
  • "msg"profiles.msg_read_at for id_tag = key
  • "thread"actions.comments_read_at for action_id = key Unknown scope → bad-request error.
Source

fn auto_track_action<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Auto-subscribe at Tracking: set sub_level='T' only when it is currently NULL (never downgrade an existing Watching). No-op if the row is absent. (Manual W/T/M changes go through update_action_data’s sub_level patch.)

Source

fn create_action<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, tn_id: TnId, action: &'life1 Action<&'life2 str>, key: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = ClResult<ActionId<Box<str>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn finalize_action<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, a_id: u64, action_id: &'life1 str, options: FinalizeActionOptions<'life2>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn create_inbound_action<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, token: &'life2 str, ack_token: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn get_action_root_id<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the root_id of an action

Source

fn get_action_data<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<ActionData>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get action data (subject, reaction count, comment count)

Source

fn get_action_by_key<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_key: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Action<Box<str>>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get action by key

Source

fn store_action_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, token: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Store action token for federation (called when action is created)

Source

fn get_action_token<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Box<str>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get action token for federation

Source

fn update_action_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, opts: &'life2 UpdateActionDataOptions, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update action data (subject, reactions, comments, status)

Source

fn update_inbound_action<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, status: Option<char>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update inbound action status

Get related action tokens by APRV action_id Returns list of (action_id, token) pairs for actions that have ack = aprv_action_id

Source

fn get_file_id<'life0, 'async_trait>( &'life0 self, tn_id: TnId, f_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_files<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListFileOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<FileView>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn list_file_variants<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, file_id: FileId<&'life1 str>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<FileVariant<Box<str>>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn list_available_variants<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Box<str>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List locally available variant names for a file (only those marked available)

Source

fn list_referenced_variant_ids<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Box<str>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List every variant_id whose blob is expected to be present in the given tenant’s blob store. For TnId(0) returns the union of all global=1 variant rows across tenants; for other tenants returns only the variants whose global=0 (i.e., stored locally, not in shared).

Source

fn is_variant_referenced<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, variant_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Targeted recheck for the blob GC: is there currently a file_variants row that expects this blob to live in tn_id’s blob store? For TnId(0) matches any global=1 row; for other tenants matches a tn_id-scoped global=0 row. Used to close the race between the referenced-set snapshot and the actual delete_blob call.

Source

fn read_file_variant<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, variant_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<FileVariant<Box<str>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn read_file_id_by_variant<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, variant_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Look up the file_id for a given variant_id

Source

fn read_f_id_by_file_id<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Look up the internal f_id for a given file_id (for adding variants to existing files)

Source

fn create_file<'life0, 'async_trait>( &'life0 self, tn_id: TnId, opts: CreateFile, ) -> Pin<Box<dyn Future<Output = ClResult<FileId<Box<str>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn create_file_variant<'a, 'async_trait>( &'a self, tn_id: TnId, f_id: u64, opts: FileVariant<&'a str>, ) -> Pin<Box<dyn Future<Output = ClResult<&'a str>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Source

fn update_file_id<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, f_id: u64, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn finalize_file<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, f_id: u64, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Finalize a pending file - sets file_id and transitions status from ‘P’ to ‘A’ atomically

Source

fn list_files_by_parent<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, parent_id: &'life1 str, before: Timestamp, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<u64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List internal f_ids of files whose parent_id equals the given sentinel (e.g. MANAGED_PARENT_ID) and whose created_at is strictly before before. Used by the file GC to enumerate candidates inside the managed folder while honouring the safety window.

Source

fn list_referenced_managed_fids<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<HashSet<u64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Internal f_ids of files in the managed folder that are still referenced by at least one canonical column. The file GC keeps any candidate whose f_id is in this set.

Returning numeric f_ids (instead of string file_ids) keeps the reference set small — it is naturally scoped to managed-folder rows by the join, so even tenants with millions of references hold only the distinct managed-file count in memory.

Current sources:

  • actions.attachments (CSV-split, every action regardless of actions.status). Both raw file_id tokens and @<f_id> draft-time placeholders resolve via the files table — the latter must not be dropped, or files attached to drafts that finalized after the draft was saved would be reaped.
  • tenants.profile_pic, tenants.cover_pic (this tenant).
  • profiles.profile_pic (cached remote profile images, this tenant).

MUST be updated when a new column names a file in the managed folder. Missing a source here will cause the GC to reap files that are still referenced elsewhere.

Source

fn hard_delete_file<'life0, 'async_trait>( &'life0 self, tn_id: TnId, f_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Box<str>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Hard-delete a file: removes all file_variants rows and then the files row inside a single transaction. Intended for the file GC.

Returns the deleted row’s file_id, which the caller needs to drop the search index entry: an f_id alone cannot be mapped back to one once the row is gone. None for an unfinalized upload, which never had one.

Source

fn list_tasks<'life0, 'async_trait>( &'life0 self, opts: ListTaskOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Task>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_task_ids<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, kind: &'life1 str, keys: &'life2 [Box<str>], ) -> Pin<Box<dyn Future<Output = ClResult<Vec<u64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn create_task<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, kind: &'static str, key: Option<&'life1 str>, input: &'life2 str, deps: &'life3 [u64], ) -> Pin<Box<dyn Future<Output = ClResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn update_task_finished<'life0, 'life1, 'async_trait>( &'life0 self, task_id: u64, output: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn update_task_error<'life0, 'life1, 'async_trait>( &'life0 self, task_id: u64, output: &'life1 str, next_at: Option<Timestamp>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn find_task_by_key<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Task>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find a pending task by its key

Source

fn update_task<'life0, 'life1, 'async_trait>( &'life0 self, task_id: u64, patch: &'life1 TaskPatch, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update task fields with partial updates

Source

fn find_completed_deps<'life0, 'life1, 'async_trait>( &'life0 self, deps: &'life1 [u64], ) -> Pin<Box<dyn Future<Output = ClResult<Vec<u64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find deps that have completed (status != ‘P’)

Source

fn get_profile_info<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<ProfileData>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a single profile by id_tag

Source

fn get_action<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<ActionView>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a single action by action_id

Source

fn get_action_type<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Box<str>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lightweight probe: the action’s type column only (no joins/hydration).

Source

fn update_action<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, content: Option<&'life2 str>, attachments: Option<&'life3 [&'life4 str]>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Update action content and attachments (if not yet federated)

Source

fn delete_action<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete an action (soft delete with cleanup)

Source

fn delete_file<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<DeleteFileResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete file_id and its document-tree children (tombstoned as status = 'D'; the file GC reclaims blobs and hard-deletes later), cascading everything that would otherwise outlive them: SHARE_FILE_REF_TYPE refs naming any of the ids, and share_entries where any of the ids is either the resource or the subject.

One transaction, because file ids are content-addressed: re-uploading identical content resurrects the row, and a half-run cascade would resurrect stale grants with it. Not soft delete — that moves the file to the trash folder and keeps links and grants working.

file_id may be @{f_id}; the result reports the resolved content ids.

Source

fn list_settings<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, prefix: Option<&'life1 [String]>, ) -> Pin<Box<dyn Future<Output = ClResult<HashMap<String, Value>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List all settings for a tenant, optionally filtered by prefix

Source

fn read_setting<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Value>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read a single setting by name

Source

fn update_setting<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, value: Option<Value>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update or delete a setting (None = delete)

Source

fn list_refs<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 ListRefsOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<RefData>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List all references for a tenant

Source

fn get_ref<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ref_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<RefData>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a specific reference by ID

Source

fn create_ref<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, ref_id: &'life1 str, opts: &'life2 CreateRefOptions, ) -> Pin<Box<dyn Future<Output = ClResult<RefData>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Create a new reference

Source

fn delete_ref<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ref_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete a reference

Source

fn update_ref<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, ref_id: &'life1 str, opts: &'life2 UpdateRefOptions, ) -> Pin<Box<dyn Future<Output = ClResult<RefData>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update fields of an existing reference. Returns the updated row.

Source

fn use_ref<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ref_id: &'life1 str, expected_types: &'life2 [&'life3 str], ) -> Pin<Box<dyn Future<Output = ClResult<(TnId, Box<str>, RefData)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Use/consume a reference - validates type, expiration, counter, decrements counter Returns (TnId, id_tag, RefData) of the tenant that owns this ref

Source

fn validate_ref<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ref_id: &'life1 str, expected_types: &'life2 [&'life3 str], ) -> Pin<Box<dyn Future<Output = ClResult<(TnId, Box<str>, RefData)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Validate a reference without consuming it - checks type, expiration, counter Returns (TnId, id_tag, RefData) of the tenant that owns this ref if valid

Source

fn list_tags<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, prefix: Option<&'life1 str>, with_counts: bool, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<TagInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List all tags for a tenant

§Arguments
  • tn_id - Tenant ID
  • prefix - Optional prefix filter
  • with_counts - If true, include file counts per tag
  • limit - Optional limit on number of tags returned
Source

fn add_tag<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, tag: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Add a tag to a file

Source

fn remove_tag<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, tag: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Remove a tag from a file

Source

fn update_file_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, opts: &'life2 UpdateFileOptions, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update file metadata (name, visibility, status)

Source

fn read_file<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<FileView>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read file metadata

Source

fn read_file_with_user_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, file_id: &'life1 str, id_tag: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<FileView>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Like [read_file] but also populates user_data (pinned, starred, per-user timestamps, cached cross-context access_level) for the given user.

Source

fn record_file_access<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, file_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Record file access for a user (upserts record, updates accessed_at timestamp)

Source

fn record_file_modification<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, file_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Record file modification for a user (upserts record, updates modified_at timestamp)

Source

fn update_file_user_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, file_id: &'life2 str, pinned: Patch<bool>, starred: Patch<bool>, access_level: Patch<char>, ) -> Pin<Box<dyn Future<Output = ClResult<FileUserData>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update file user data (pinned/starred status, cached access_level).

All three fields share the same three-state Patch encoding: Patch::Undefined leaves the column untouched, Patch::Null clears it (writes NULL — pinned/starred read back as false), Patch::Value(v) sets it (access_level ch ∈ {‘R’, ‘C’, ‘W’, ‘A’} — the crate::types::AccessLevel::to_perm_char vocabulary, 'A' included). Used by the POST /files/{id}/refresh handler (and FSHR on_accept on the receiver side) to cache the source-reported cross-context access level.

Source

fn get_file_user_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, file_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<FileUserData>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get file user data for a specific file

Source

fn list_push_subscriptions<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<PushSubscription>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all push subscriptions for a tenant (user)

Returns all active push subscriptions for this tenant. Each tenant represents a user, so this returns all their device subscriptions.

Source

fn create_push_subscription<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, subscription: &'life1 PushSubscriptionData, ) -> Pin<Box<dyn Future<Output = ClResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a new push subscription

Stores a Web Push subscription for a tenant. The subscription contains the endpoint URL and encryption keys needed to send push notifications. Returns the generated subscription ID.

Source

fn delete_push_subscription<'life0, 'async_trait>( &'life0 self, tn_id: TnId, subscription_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete a push subscription by ID

Removes a push subscription. Called when a subscription becomes invalid (e.g., 410 Gone response from push service) or when user unsubscribes.

Source

fn create_share_entry<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, tn_id: TnId, resource_type: char, resource_id: &'life1 str, created_by: &'life2 str, entry: &'life3 CreateShareEntry, ) -> Pin<Box<dyn Future<Output = ClResult<ShareEntry>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Create a share entry (idempotent on unique constraint)

Source

fn delete_share_entry<'life0, 'async_trait>( &'life0 self, tn_id: TnId, id: i64, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete a share entry by ID

Source

fn update_share_entry<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id: i64, resource_type: char, resource_id: &'life1 str, opts: &'life2 UpdateShareEntryOptions, ) -> Pin<Box<dyn Future<Output = ClResult<ShareEntry>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update fields of an existing share entry using PATCH semantics. The update only applies if the row also matches (resource_type, resource_id), which both prevents cross-resource targeting and removes the need for a caller-side pre-read. Returns the updated row via SQL RETURNING, or Error::NotFound if no row matched.

Source

fn list_share_entries<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, resource_type: char, resource_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<ShareEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List share entries for a resource

Source

fn list_share_entries_by_subject<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, subject_type: Option<char>, subject_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<ShareEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List share entries by subject (reverse lookup). If subject_type is None, matches all subject types.

Source

fn check_share_access<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, resource_type: char, resource_id: &'life1 str, subject_type: char, subject_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<char>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Check if a subject has share access to a resource Returns the permission char if access exists, None otherwise

Source

fn read_share_entry<'life0, 'async_trait>( &'life0 self, tn_id: TnId, id: i64, ) -> Pin<Box<dyn Future<Output = ClResult<Option<ShareEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Read a single share entry by ID (for delete validation)

Source

fn install_app<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, install: &'life1 InstallApp, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Install an app package

Source

fn uninstall_app<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, app_name: &'life1 str, publisher_tag: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Uninstall an app by name and publisher

Source

fn list_installed_apps<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, search: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<InstalledApp>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List installed apps, optionally filtered by search term

Source

fn get_installed_app<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, app_name: &'life1 str, publisher_tag: &'life2 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<InstalledApp>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get a specific installed app

Source

fn replace_search_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, tn_id: TnId, obj: &'life1 SearchObject<'life2>, parts: &'life3 [SearchPart<'life4>], ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Replace every index row of one object atomically: delete the existing (obj_tp, obj_id) rows, then insert parts. An empty parts slice is equivalent to MetaAdapter::delete_search_object.

Source

fn replace_search_row<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, tn_id: TnId, obj_tp: char, obj_id: &'life1 str, part: Option<&'life2 SearchPart<'life3>>, fts_cl: bool, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Replace the single whole-object index row for (obj_tp, obj_id).

obj_tp selects the source table — 'F' files, 'P' profiles, 'A' actions — and the adapter derives content_type, owner_tag, visibility, root_id, created_at and part_kind from that row, so the index and its source can never disagree about who may see it. Only title, body and tags come from the caller; part_id, parent_part and anchor_id have no place in a whole-object row and may be rejected rather than dropped silently.

part = None deletes the row, and so does a Some whose source row has meanwhile vanished. For 'F' the call also refreshes the ACL columns of the file’s deep 'D' rows, and drops them when the file is gone.

fts_cl selects the index route as SearchObject::fts_cl does; flipping it for an existing object only takes effect through a full reindex.

Source

fn delete_search_object<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, obj_tp: char, obj_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove every index row of one object.

Source

fn delete_deep_search_by_content_type<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, content_type: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Drop the deep 'D' index rows of one content type — used when a format manifest’s index rules change and the parts they produced must be rebuilt.

The whole-object 'F' rows are server-owned — a file name and a tag list — and outlive any manifest, so they are left in place: dropping them would make every such file unfindable by name until the next weekly sweep.

Source

fn reap_search_orphans<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete the whole-object index rows of one tenant whose source row is gone.

Not a rebuild: what an object contributes is decided in Rust and written through MetaAdapter::replace_search_row, so all SQL can catch is a source row hard-deleted without its index row going with it. Deep 'D' rows are not touched.

Source

fn search<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, opts: &'life1 SearchOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<SearchRow>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Run a full-text query. Results are relevance-ordered, so pagination is limit/offset rather than the keyset cursor used elsewhere.

How many rows MetaAdapter::search would match for the same opts, ignoring limit and offset — a relevance ordering gives pagination no other has-more signal to anchor on.

Counted with the same SQL filters as search, and therefore before the handler’s ABAC post-filter: for a scoped token it is an upper bound.

Source

fn read_tenant_data<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Box<str>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read one opaque per-tenant value written by a subsystem.

Distinct from read_setting: a setting is user-facing, registered, validated and shown in the admin UI; this is a subsystem’s own bookkeeping (a watermark, a schema revision) that no operator should see or change.

Source

fn write_tenant_data<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, value: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Write, or with value = None delete, one such value.

Source

fn read_doc_format<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, content_type: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<DocFormat>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read the manifest claiming content_type, if any.

Source

fn list_doc_formats<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<DocFormat>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List every active manifest of this tenant.

Source

fn upsert_doc_format<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, fmt: &'life1 UpsertDocFormat<'life2>, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Create or update a manifest. Callers must enforce the claim rule first.

Source

fn delete_doc_format<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, content_type: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Remove a manifest.

Source

fn create_address_book<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, description: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = ClResult<AddressBook>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Create a new address book collection.

Source

fn list_address_books<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<AddressBook>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all address books for a tenant.

Source

fn get_address_book<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<Option<AddressBook>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Read a single address book by id.

Source

fn get_address_book_by_name<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<AddressBook>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Look up an address book by its name (for CardDAV path routing).

Source

fn update_address_book<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, patch: &'life1 UpdateAddressBookData, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Patch an address book’s metadata.

Source

fn delete_address_book<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete an address book (and all its contacts).

Source

fn list_contacts<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: Option<u64>, opts: &'life1 ListContactOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<ContactView>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List + search contacts. When ab_id is Some, scopes to that book (cursor is c_id-ordered). When None, queries across all books sorted by name.

Source

fn get_contact<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, uid: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Contact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read a single contact (including vCard blob) by UID.

Source

fn upsert_contact<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, uid: &'life1 str, vcard: &'life2 str, etag: &'life3 str, extracted: &'life4 ContactExtracted, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Insert or update a contact (keyed by UID). Also bumps the address book’s ctag. Returns the new etag.

Source

fn delete_contact<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, uid: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Soft-delete a contact (sets deleted_at), leaving a tombstone row for CardDAV sync. Also bumps the address book’s ctag.

Source

fn get_contacts_by_uids<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, uids: &'life1 [&'life2 str], ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Contact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fetch multiple contacts by UID — for CardDAV addressbook-multiget REPORT.

Source

fn list_contacts_since<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ab_id: u64, since: Option<Timestamp>, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<ContactSyncEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return live + tombstone entries for CardDAV sync-collection REPORT. since is the sync token’s timestamp; None means full sync. limit caps the number of rows returned; callers supply their own hard ceiling to keep responses bounded. None means no client-supplied limit — callers should still pass their server-side ceiling.

Source

fn list_contacts_by_profile<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, profile_id_tag: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Contact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List all contacts linked to a given profile id_tag (for bulk snapshot refresh).

Source

fn create_calendar<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, input: &'life1 CreateCalendarData, ) -> Pin<Box<dyn Future<Output = ClResult<Calendar>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a new calendar collection.

Source

fn list_calendars<'life0, 'async_trait>( &'life0 self, tn_id: TnId, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<Calendar>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all calendars for a tenant.

Source

fn get_calendar<'life0, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Calendar>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Read a single calendar by id.

Source

fn get_calendar_by_name<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<Calendar>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Look up a calendar by its name (for CalDAV path routing).

Source

fn update_calendar<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, patch: &'life1 UpdateCalendarData, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Patch a calendar’s metadata.

Source

fn delete_calendar<'life0, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete a calendar (and all its objects).

Source

fn list_calendar_objects<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, opts: &'life1 ListCalendarObjectOptions, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<CalendarObjectView>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List + search calendar objects within a calendar. Excludes soft-deleted rows.

Source

fn get_calendar_object<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Option<CalendarObject>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read a single calendar object (including iCalendar blob) by UID. Returns the master row; recurrence-override rows live under the same UID but distinct recurrence_id and are not merged here.

Source

fn get_calendar_object_override<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, recurrence_id: Timestamp, ) -> Pin<Box<dyn Future<Output = ClResult<Option<CalendarObject>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read a single recurrence-override row keyed by (uid, recurrence_id).

Source

fn list_calendar_object_overrides<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<CalendarObject>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List all non-deleted recurrence-override rows for a given master UID.

Source

fn delete_calendar_object_override<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, recurrence_id: Timestamp, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Soft-delete a single recurrence-override row (leaves the master untouched).

Source

fn upsert_calendar_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, ical: &'life2 str, etag: &'life3 str, extracted: &'life4 CalendarObjectExtracted, ) -> Pin<Box<dyn Future<Output = ClResult<Box<str>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Insert or update a calendar object (keyed by UID). Also bumps the calendar’s ctag. Returns the new etag. The extracted.recurrence_id selects which row is written — the master row has None, recurrence overrides carry their own timestamp.

Source

fn delete_calendar_object<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uid: &'life1 str, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Soft-delete a calendar object by UID (sets deleted_at on all rows sharing that UID), leaving tombstones for CalDAV sync. Also bumps the calendar’s ctag.

Source

fn split_calendar_object_series<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, master: CalendarObjectWrite<'life1>, tail: CalendarObjectWrite<'life2>, split_at: Timestamp, ) -> Pin<Box<dyn Future<Output = ClResult<(Box<str>, Box<str>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Atomically split a recurring series at split_at:

  1. Upsert the existing master (typically with a truncated RRULE) using the caller-supplied ical / etag / extracted projection.
  2. Soft-delete every override row whose recurrence_id >= split_at.
  3. Insert the tail as a new master under its own UID.
  4. Bump the calendar’s ctag once for the whole fork.

The whole operation runs in a single transaction; on any error the caller sees the original series unchanged. Returns the stored etags of the master and the tail, in that order.

Source

fn get_calendar_objects_by_uids<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, uids: &'life1 [&'life2 str], ) -> Pin<Box<dyn Future<Output = ClResult<Vec<CalendarObject>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fetch multiple calendar objects by UID — for CalDAV calendar-multiget REPORT.

Source

fn list_calendar_objects_since<'life0, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, since: Option<Timestamp>, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<CalendarObjectSyncEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return live + tombstone entries for CalDAV sync-collection REPORT. since is the sync token’s timestamp; None means full sync.

Source

fn query_calendar_objects_in_range<'life0, 'life1, 'async_trait>( &'life0 self, tn_id: TnId, cal_id: u64, component: Option<&'life1 str>, start: Option<Timestamp>, end: Option<Timestamp>, ) -> Pin<Box<dyn Future<Output = ClResult<Vec<CalendarObject>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return calendar objects overlapping a time range — for CalDAV calendar-query REPORT. Semantics are deliberately loose (superset): any object whose master dtstart is ≤ end AND (rrule is set OR dtend is ≥ start OR dtend IS NULL) is returned. Clients expand recurrence locally. A None component lists both VEVENT and VTODO.

Provided Methods§

Source

fn optimize_search_index<'life0, 'async_trait>( &'life0 self, full: bool, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Merge the search indexes’ segments. full runs the exhaustive pass, worth its cost only after a bulk rebuild. Defaults to a no-op: an adapter whose index needs no compaction — or has none — implements nothing.

Both indexes are database-wide, not per tenant, so this takes no TnId and must be called once per sweep rather than once per tenant.

Source

fn reclaim_space<'life0, 'async_trait>( &'life0 self, min_free_pct: i64, ) -> Pin<Box<dyn Future<Output = ClResult<SpaceReport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Checkpoint, analyse, and — only if at least min_free_pct percent of pages are free — rewrite the database to give the space back to the filesystem.

The gate exists because the rewrite holds the single write connection for its whole duration. Defaults to reclaiming nothing and reporting an all-zero SpaceReport.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§