pub trait AsyncMakeService {
    type Service;
    type Error;

    // Required method
    fn make_via_ref(
        &self,
        old: Option<&Self::Service>
    ) -> impl Future<Output = Result<Self::Service, Self::Error>>;

    // Provided method
    fn make(&self) -> impl Future<Output = Result<Self::Service, Self::Error>> { ... }
}

Required Associated Types§

Required Methods§

source

fn make_via_ref( &self, old: Option<&Self::Service> ) -> impl Future<Output = Result<Self::Service, Self::Error>>

Provided Methods§

source

fn make(&self) -> impl Future<Output = Result<Self::Service, Self::Error>>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: AsyncMakeService + ?Sized> AsyncMakeService for &T

§

type Service = <T as AsyncMakeService>::Service

§

type Error = <T as AsyncMakeService>::Error

source§

async fn make_via_ref( &self, old: Option<&Self::Service> ) -> Result<Self::Service, Self::Error>

source§

impl<T: AsyncMakeService + ?Sized> AsyncMakeService for Box<T>

§

type Service = <T as AsyncMakeService>::Service

§

type Error = <T as AsyncMakeService>::Error

source§

async fn make_via_ref( &self, old: Option<&Self::Service> ) -> Result<Self::Service, Self::Error>

source§

impl<T: AsyncMakeService + ?Sized> AsyncMakeService for Arc<T>

§

type Service = <T as AsyncMakeService>::Service

§

type Error = <T as AsyncMakeService>::Error

source§

async fn make_via_ref( &self, old: Option<&Self::Service> ) -> Result<Self::Service, Self::Error>

Implementors§