soph_cache/support/instance.rs
use crate::{
async_trait,
error::Error,
traits::{ErrorTrait, InstanceTrait},
Cache, Result,
};
use soph_core::{error::ContainerError, support::Container};
#[async_trait]
impl InstanceTrait for Cache {
type Error = Error;
async fn register(_: &Container) -> Result<Self, ContainerError>
where
Self: Sized,
{
Ok(Self::new().map_err(Error::wrap)?)
}
}