soph_cache/support/instance.rs
1use crate::{
2 async_trait,
3 error::Error,
4 traits::{ErrorTrait, InstanceTrait},
5 Cache, Result,
6};
7use soph_core::{error::ContainerError, support::Container};
8
9#[async_trait]
10impl InstanceTrait for Cache {
11 type Error = Error;
12
13 async fn register(_: &Container) -> Result<Self, ContainerError>
14 where
15 Self: Sized,
16 {
17 Ok(Self::new().map_err(Error::wrap)?)
18 }
19}