pub struct Foundry<B: FoundryBackend> { /* private fields */ }
Expand description
Foundry façade providing storage-agnostic domain logic
Implementations§
Source§impl<B: FoundryBackend> Foundry<B>
impl<B: FoundryBackend> Foundry<B>
pub fn new(backend: B) -> Self
pub async fn create_project(&self, config: ProjectConfig) -> Result<Project>
pub async fn project_exists(&self, name: &str) -> Result<bool>
pub async fn list_projects(&self) -> Result<Vec<ProjectMetadata>>
pub async fn load_project(&self, name: &str) -> Result<Project>
pub async fn create_spec(&self, config: SpecConfig) -> Result<Spec>
pub async fn list_specs(&self, project_name: &str) -> Result<Vec<SpecMetadata>>
pub async fn load_spec( &self, project_name: &str, spec_name: &str, ) -> Result<Spec>
pub async fn update_spec_content( &self, project_name: &str, spec_name: &str, file_type: SpecFileType, content: &str, ) -> Result<()>
pub async fn delete_spec( &self, project_name: &str, spec_name: &str, ) -> Result<()>
pub async fn get_latest_spec( &self, project_name: &str, ) -> Result<Option<SpecMetadata>>
pub async fn count_specs(&self, project_name: &str) -> Result<usize>
pub fn generate_spec_name(feature_name: &str) -> String
pub fn validate_spec_name(spec_name: &str) -> Result<()>
pub async fn find_spec_match( &self, project_name: &str, query: &str, ) -> Result<SpecMatchStrategy>
pub async fn apply_edit_commands( &self, project_name: &str, spec_name: &str, commands: &[EditCommand], ) -> Result<EditCommandsResult>
Trait Implementations§
Source§impl<B: FoundryBackend> SpecContentStore for Foundry<B>
SpecContentStore implementation for the Foundry façade
impl<B: FoundryBackend> SpecContentStore for Foundry<B>
SpecContentStore implementation for the Foundry façade
fn read_spec_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_name: &'life1 str,
spec_name: &'life2 str,
file_type: SpecFileType,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_spec_file<'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 is_file_modified<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project_name: &'life1 str,
spec_name: &'life2 str,
file_type: SpecFileType,
new_content: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Auto Trait Implementations§
impl<B> Freeze for Foundry<B>where
B: Freeze,
impl<B> RefUnwindSafe for Foundry<B>where
B: RefUnwindSafe,
impl<B> Send for Foundry<B>
impl<B> Sync for Foundry<B>
impl<B> Unpin for Foundry<B>where
B: Unpin,
impl<B> UnwindSafe for Foundry<B>where
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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