pub struct MemoryStorage { /* private fields */ }Expand description
In-memory storage backend
Implementations§
Source§impl MemoryStorage
impl MemoryStorage
Trait Implementations§
Source§impl Default for MemoryStorage
impl Default for MemoryStorage
Source§impl StorageBackend for MemoryStorage
impl StorageBackend for MemoryStorage
Source§fn store_schema<'life0, 'async_trait>(
&'life0 self,
schema: Schema,
) -> Pin<Box<dyn Future<Output = SchemaResult<SchemaId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store_schema<'life0, 'async_trait>(
&'life0 self,
schema: Schema,
) -> Pin<Box<dyn Future<Output = SchemaResult<SchemaId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store a schema and return its ID
Source§fn get_schema<'life0, 'async_trait>(
&'life0 self,
id: SchemaId,
) -> Pin<Box<dyn Future<Output = SchemaResult<Option<Schema>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_schema<'life0, 'async_trait>(
&'life0 self,
id: SchemaId,
) -> Pin<Box<dyn Future<Output = SchemaResult<Option<Schema>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get schema by ID
Source§fn get_schema_by_fingerprint<'life0, 'life1, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
) -> Pin<Box<dyn Future<Output = SchemaResult<Option<Schema>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_schema_by_fingerprint<'life0, 'life1, 'async_trait>(
&'life0 self,
fingerprint: &'life1 str,
) -> Pin<Box<dyn Future<Output = SchemaResult<Option<Schema>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get schema by fingerprint (for deduplication)
Source§fn register_subject_version<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
schema_id: SchemaId,
) -> Pin<Box<dyn Future<Output = SchemaResult<SchemaVersion>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_subject_version<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
schema_id: SchemaId,
) -> Pin<Box<dyn Future<Output = SchemaResult<SchemaVersion>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register a schema under a subject
Source§fn get_versions<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
) -> Pin<Box<dyn Future<Output = SchemaResult<Vec<u32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_versions<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
) -> Pin<Box<dyn Future<Output = SchemaResult<Vec<u32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get all versions for a subject
Source§fn get_subject_version<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
version: SchemaVersion,
) -> Pin<Box<dyn Future<Output = SchemaResult<Option<SubjectVersion>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_subject_version<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
version: SchemaVersion,
) -> Pin<Box<dyn Future<Output = SchemaResult<Option<SubjectVersion>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a specific version of a subject
Source§fn get_latest_version<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
) -> Pin<Box<dyn Future<Output = SchemaResult<Option<SubjectVersion>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_latest_version<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
) -> Pin<Box<dyn Future<Output = SchemaResult<Option<SubjectVersion>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the latest version of a subject
Source§fn list_subjects<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SchemaResult<Vec<Subject>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_subjects<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SchemaResult<Vec<Subject>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all subjects
Source§fn delete_subject<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
permanent: bool,
) -> Pin<Box<dyn Future<Output = SchemaResult<Vec<u32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_subject<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
permanent: bool,
) -> Pin<Box<dyn Future<Output = SchemaResult<Vec<u32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a subject (soft delete by default)
Source§fn delete_version<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
version: SchemaVersion,
permanent: bool,
) -> Pin<Box<dyn Future<Output = SchemaResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_version<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
version: SchemaVersion,
permanent: bool,
) -> Pin<Box<dyn Future<Output = SchemaResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a specific version
Source§fn next_schema_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SchemaResult<SchemaId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_schema_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SchemaResult<SchemaId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the next schema ID
Source§fn subject_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
) -> Pin<Box<dyn Future<Output = SchemaResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subject_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
) -> Pin<Box<dyn Future<Output = SchemaResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a subject exists
Source§fn set_version_state<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
version: SchemaVersion,
state: VersionState,
) -> Pin<Box<dyn Future<Output = SchemaResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_version_state<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
version: SchemaVersion,
state: VersionState,
) -> Pin<Box<dyn Future<Output = SchemaResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set the state of a version (enabled/deprecated/disabled)
Source§fn get_version_state<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
version: SchemaVersion,
) -> Pin<Box<dyn Future<Output = SchemaResult<VersionState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_version_state<'life0, 'life1, 'async_trait>(
&'life0 self,
subject: &'life1 Subject,
version: SchemaVersion,
) -> Pin<Box<dyn Future<Output = SchemaResult<VersionState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the state of a version
Source§fn list_deleted_subjects<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SchemaResult<Vec<Subject>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_deleted_subjects<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = SchemaResult<Vec<Subject>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List deleted subjects (for recovery)
Auto Trait Implementations§
impl !Freeze for MemoryStorage
impl !RefUnwindSafe for MemoryStorage
impl Send for MemoryStorage
impl Sync for MemoryStorage
impl Unpin for MemoryStorage
impl UnsafeUnpin for MemoryStorage
impl UnwindSafe for MemoryStorage
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