Skip to main content

MetaAdapterSqlite

Struct MetaAdapterSqlite 

Source
pub struct MetaAdapterSqlite { /* private fields */ }

Implementations§

Source§

impl MetaAdapterSqlite

Source

pub async fn new( worker: Arc<WorkerPool>, path: impl AsRef<Path>, ) -> ClResult<Self>

Trait Implementations§

Source§

impl Debug for MetaAdapterSqlite

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl MetaAdapter for MetaAdapterSqlite

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 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 Read more
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 Read more
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 create_profile<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, tn_id: TnId, profile: &'life1 Profile<&'life2 str>, etag: &'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 update_profile<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tn_id: TnId, id_tag: &'life1 str, profile: &'life2 UpdateProfileData, ) -> Pin<Box<dyn Future<Output = ClResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

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 Read more
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, ) -> 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 process_profile_refresh<'a, 'life0, 'async_trait>( &'life0 self, callback: Box<dyn Fn(TnId, &'a str, Option<&'a str>) -> ClResult<()> + Send>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Process profile refresh callback(tn_id: TnId, id_tag: &str, etag: Option<&str>)
Source§

fn list_stale_profiles<'life0, 'async_trait>( &'life0 self, max_age_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 Read more
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 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 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 create_outbound_action<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, token: &'life2 str, opts: &'life3 CreateOutboundActionOptions, ) -> 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,

Create outbound action
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 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_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 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 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 add_reaction<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, tn_id: TnId, action_id: &'life1 str, reactor_id_tag: &'life2 str, reaction_type: &'life3 str, content: Option<&'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,

Add a reaction to an action
Source§

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

List all reactions for an action
Source§

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

Delete a file (set status to ‘D’)
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<(Box<str>, Box<str>)>>> + 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 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 Read more
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 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: Option<bool>, starred: Option<bool>, ) -> 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)
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) Read more
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 Read more
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 Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more