pub struct InMemoryStorage { /* private fields */ }Expand description
In-memory storage backend for testing purposes.
Stores all data in memory with no persistence. Useful for unit tests and development scenarios.
§Examples
use thread_flow::incremental::storage::InMemoryStorage;
let storage = InMemoryStorage::new();Implementations§
Trait Implementations§
Source§impl Debug for InMemoryStorage
impl Debug for InMemoryStorage
Source§impl Default for InMemoryStorage
impl Default for InMemoryStorage
Source§impl StorageBackend for InMemoryStorage
impl StorageBackend for InMemoryStorage
Source§fn save_fingerprint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
fingerprint: &'life2 AnalysisDefFingerprint,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_fingerprint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
fingerprint: &'life2 AnalysisDefFingerprint,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persists a fingerprint for the given file path. Read more
Source§fn load_fingerprint<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Option<AnalysisDefFingerprint>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_fingerprint<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Option<AnalysisDefFingerprint>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads the fingerprint for a file, if one exists. Read more
Source§fn delete_fingerprint<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_fingerprint<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes the fingerprint for a file. Read more
Source§fn save_edge<'life0, 'life1, 'async_trait>(
&'life0 self,
edge: &'life1 DependencyEdge,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_edge<'life0, 'life1, 'async_trait>(
&'life0 self,
edge: &'life1 DependencyEdge,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persists a dependency edge. Read more
Source§fn load_edges_from<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<DependencyEdge>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_edges_from<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<DependencyEdge>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads all dependency edges originating from a file.
Source§fn load_edges_to<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<DependencyEdge>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_edges_to<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<DependencyEdge>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads all dependency edges targeting a file.
Source§fn delete_edges_for<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<usize, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_edges_for<'life0, 'life1, 'async_trait>(
&'life0 self,
file_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<usize, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes all dependency edges involving a file (as source or target).
Source§fn load_full_graph<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DependencyGraph, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_full_graph<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DependencyGraph, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Loads the complete dependency graph from storage. Read more
Source§fn save_full_graph<'life0, 'life1, 'async_trait>(
&'life0 self,
graph: &'life1 DependencyGraph,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_full_graph<'life0, 'life1, 'async_trait>(
&'life0 self,
graph: &'life1 DependencyGraph,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persists the complete dependency graph to storage. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryStorage
impl !RefUnwindSafe for InMemoryStorage
impl Send for InMemoryStorage
impl Sync for InMemoryStorage
impl Unpin for InMemoryStorage
impl UnsafeUnpin for InMemoryStorage
impl !UnwindSafe for InMemoryStorage
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