froodi 1.0.0-beta.9

An ergonomic Rust IoC container
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub trait Service<Request: ?Sized> {
    type Response;
    type Error;

    fn call(&mut self, request: Request) -> Result<Self::Response, Self::Error>;
}

impl<'a, S: Service<Request> + 'a + ?Sized, Request> Service<Request> for &'a mut S {
    type Response = S::Response;
    type Error = S::Error;

    #[inline]
    fn call(&mut self, request: Request) -> Result<Self::Response, Self::Error> {
        (**self).call(request)
    }
}