pub trait Database: Send + Sync {
Show 25 methods
// Required methods
fn projects_find<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageList<Project>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn project_get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Project>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn project_save<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 Project,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn project_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn project_apikeys_find<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
query: &'life2 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageList<ApiKey>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_apikeys_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
apikeys: &'life2 Vec<ApiKey>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_apikeys_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
ids: &'life2 Vec<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_identity_source_get<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<IdentitySource>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn project_identity_source_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
identity_source: &'life2 IdentitySource,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_identity_source_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn project_schema_find<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Schema>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn project_schema_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
schema: &'life2 Schema,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_schema_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn project_entities_find<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
query: &'life2 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageList<Entity>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_entities_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
entities: &'life2 Vec<Entity>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_entities_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
entity_uids: &'life2 Vec<EntityUid>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_policies_find<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
query: &'life2 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageHash<PolicyId, Policy>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_policies_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
policies: &'life2 HashMap<PolicyId, Policy>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_policies_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
policy_ids: &'life2 Vec<PolicyId>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_templates_find<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
query: &'life2 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageHash<PolicyId, Template>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_templates_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
templates: &'life2 HashMap<PolicyId, Template>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_templates_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
template_ids: &'life2 Vec<PolicyId>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_template_links_find<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
query: &'life2 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageList<TemplateLink>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_template_links_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
template_links: &'life2 Vec<TemplateLink>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn project_template_links_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
link_ids: &'life2 Vec<PolicyId>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Required Methods§
fn projects_find<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageList<Project>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn project_get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Project>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn project_save<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 Project,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn project_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn project_apikeys_find<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
query: &'life2 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageList<ApiKey>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_apikeys_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
apikeys: &'life2 Vec<ApiKey>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_apikeys_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
ids: &'life2 Vec<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_identity_source_get<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<IdentitySource>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn project_identity_source_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
identity_source: &'life2 IdentitySource,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_identity_source_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn project_schema_find<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Schema>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn project_schema_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
schema: &'life2 Schema,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_schema_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn project_entities_find<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
query: &'life2 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageList<Entity>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_entities_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
entities: &'life2 Vec<Entity>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_entities_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
entity_uids: &'life2 Vec<EntityUid>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_policies_find<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
query: &'life2 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageHash<PolicyId, Policy>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_policies_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
policies: &'life2 HashMap<PolicyId, Policy>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_policies_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
policy_ids: &'life2 Vec<PolicyId>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_templates_find<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
query: &'life2 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageHash<PolicyId, Template>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_templates_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
templates: &'life2 HashMap<PolicyId, Template>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_templates_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
template_ids: &'life2 Vec<PolicyId>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_template_links_find<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
query: &'life2 MangoQuery,
) -> Pin<Box<dyn Future<Output = Result<PageList<TemplateLink>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_template_links_save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
template_links: &'life2 Vec<TemplateLink>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn project_template_links_remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 Uuid,
link_ids: &'life2 Vec<PolicyId>,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".