pub struct InMemoryBackend { /* private fields */ }
Expand description
In-memory backend implementation for testing
Implementations§
Source§impl InMemoryBackend
impl InMemoryBackend
Sourcepub async fn project_count(&self) -> usize
pub async fn project_count(&self) -> usize
Get project count (useful for testing)
Sourcepub async fn spec_count_for_project(&self, project_name: &str) -> usize
pub async fn spec_count_for_project(&self, project_name: &str) -> usize
Get spec count for a project (useful for testing)
Trait Implementations§
Source§impl Clone for InMemoryBackend
impl Clone for InMemoryBackend
Source§fn clone(&self) -> InMemoryBackend
fn clone(&self) -> InMemoryBackend
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InMemoryBackend
impl Debug for InMemoryBackend
Source§impl Default for InMemoryBackend
impl Default for InMemoryBackend
Source§impl FoundryBackend for InMemoryBackend
impl FoundryBackend for InMemoryBackend
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
Auto Trait Implementations§
impl Freeze for InMemoryBackend
impl !RefUnwindSafe for InMemoryBackend
impl Send for InMemoryBackend
impl Sync for InMemoryBackend
impl Unpin for InMemoryBackend
impl !UnwindSafe for InMemoryBackend
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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