mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 11:21:24 +00:00
Use async fn in trait for Store
This commit is contained in:
parent
2090bfc99f
commit
f6087d65be
3 changed files with 0 additions and 6 deletions
|
@ -83,7 +83,6 @@ impl From<crate::store::object_store::ObjectError> for StoreError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait::async_trait(?Send)]
|
|
||||||
pub(crate) trait Store: Clone + Debug {
|
pub(crate) trait Store: Clone + Debug {
|
||||||
async fn health_check(&self) -> Result<(), StoreError>;
|
async fn health_check(&self) -> Result<(), StoreError>;
|
||||||
|
|
||||||
|
@ -153,7 +152,6 @@ pub(crate) trait Store: Clone + Debug {
|
||||||
async fn remove(&self, identifier: &Arc<str>) -> Result<(), StoreError>;
|
async fn remove(&self, identifier: &Arc<str>) -> Result<(), StoreError>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait::async_trait(?Send)]
|
|
||||||
impl<T> Store for actix_web::web::Data<T>
|
impl<T> Store for actix_web::web::Data<T>
|
||||||
where
|
where
|
||||||
T: Store,
|
T: Store,
|
||||||
|
@ -225,7 +223,6 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait::async_trait(?Send)]
|
|
||||||
impl<T> Store for Arc<T>
|
impl<T> Store for Arc<T>
|
||||||
where
|
where
|
||||||
T: Store,
|
T: Store,
|
||||||
|
@ -297,7 +294,6 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait::async_trait(?Send)]
|
|
||||||
impl<'a, T> Store for &'a T
|
impl<'a, T> Store for &'a T
|
||||||
where
|
where
|
||||||
T: Store,
|
T: Store,
|
||||||
|
|
|
@ -55,7 +55,6 @@ pub(crate) struct FileStore {
|
||||||
repo: ArcRepo,
|
repo: ArcRepo,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait::async_trait(?Send)]
|
|
||||||
impl Store for FileStore {
|
impl Store for FileStore {
|
||||||
#[tracing::instrument(level = "debug", skip(self))]
|
#[tracing::instrument(level = "debug", skip(self))]
|
||||||
async fn health_check(&self) -> Result<(), StoreError> {
|
async fn health_check(&self) -> Result<(), StoreError> {
|
||||||
|
|
|
@ -200,7 +200,6 @@ async fn status_error(response: Response, object: Option<Arc<str>>) -> StoreErro
|
||||||
ObjectError::Status(status, body, object).into()
|
ObjectError::Status(status, body, object).into()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait::async_trait(?Send)]
|
|
||||||
impl Store for ObjectStore {
|
impl Store for ObjectStore {
|
||||||
async fn health_check(&self) -> Result<(), StoreError> {
|
async fn health_check(&self) -> Result<(), StoreError> {
|
||||||
let response = self
|
let response = self
|
||||||
|
|
Loading…
Reference in a new issue