soph_http/support/instance.rs
1use crate::{
2 async_trait,
3 traits::{ErrorTrait, InstanceTrait},
4 Http, Result,
5};
6use soph_config::error::Error;
7use soph_core::{error::ContainerError, support::Container};
8
9#[async_trait]
10impl InstanceTrait for Http {
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}