FoundryBackend

Trait FoundryBackend 

Source
pub trait FoundryBackend: Send + Sync {
    // Required methods
    fn create_project<'life0, 'async_trait>(
        &'life0 self,
        config: ProjectConfig,
    ) -> Pin<Box<dyn Future<Output = Result<Project>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn project_exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_projects<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ProjectMetadata>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn load_project<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Project>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_spec<'life0, 'async_trait>(
        &'life0 self,
        config: SpecConfig,
    ) -> Pin<Box<dyn Future<Output = Result<Spec>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_specs<'life0, 'life1, 'async_trait>(
        &'life0 self,
        project_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SpecMetadata>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn load_spec<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        project_name: &'life1 str,
        spec_name: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Spec>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn update_spec_content<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        project_name: &'life1 str,
        spec_name: &'life2 str,
        file_type: SpecFileType,
        content: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn delete_spec<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        project_name: &'life1 str,
        spec_name: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get_latest_spec<'life0, 'life1, 'async_trait>(
        &'life0 self,
        project_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<SpecMetadata>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn count_specs<'life0, 'life1, 'async_trait>(
        &'life0 self,
        project_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn capabilities(&self) -> BackendCapabilities;
}
Expand description

Core backend trait defining storage contracts

Required Methods§

Source

fn create_project<'life0, 'async_trait>( &'life0 self, config: ProjectConfig, ) -> Pin<Box<dyn Future<Output = Result<Project>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn project_exists<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn list_projects<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<ProjectMetadata>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn load_project<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Project>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn create_spec<'life0, 'async_trait>( &'life0 self, config: SpecConfig, ) -> Pin<Box<dyn Future<Output = Result<Spec>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_specs<'life0, 'life1, 'async_trait>( &'life0 self, project_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<SpecMetadata>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn load_spec<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, project_name: &'life1 str, spec_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Spec>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn update_spec_content<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, project_name: &'life1 str, spec_name: &'life2 str, file_type: SpecFileType, content: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn delete_spec<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, project_name: &'life1 str, spec_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn get_latest_spec<'life0, 'life1, 'async_trait>( &'life0 self, project_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<SpecMetadata>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn count_specs<'life0, 'life1, 'async_trait>( &'life0 self, project_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn capabilities(&self) -> BackendCapabilities

Implementors§