pub trait StorageBackend: Send + Sync {
Show 16 methods
// Required methods
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 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_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 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 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_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_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 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 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_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 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 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 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 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 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 undelete_subject<'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;
}Expand description
Storage backend trait for schema persistence
Required Methods§
Sourcefn 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
Sourcefn 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
Sourcefn 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)
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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)
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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)
Sourcefn 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
Sourcefn 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)
Sourcefn undelete_subject<'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 undelete_subject<'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,
Undelete a soft-deleted subject