[][src]Struct tari_service_framework::handles::ServiceHandlesFuture

pub struct ServiceHandlesFuture { /* fields omitted */ }

Future which resolves to ServiceHandles once it is signaled to do so.

Methods

impl ServiceHandlesFuture[src]

pub fn new(
    ready_flag: Arc<AtomicBool>,
    wake_sender: Sender<Arc<AtomicWaker>>
) -> Self
[src]

Create a new ServiceHandlesFuture with empty handles

pub fn register<H>(&self, handle: H) where
    H: Any + Send + Sync
[src]

Insert a service handle with the given name

pub fn get_handle<H>(&self) -> Option<H> where
    H: Clone + 'static, 
[src]

Retrieve a handle and downcast it to return type and return a copy, otherwise None is returned

pub fn lazy_service<F, S>(&self, service_fn: F) -> LazyService<F, Self, S> where
    F: FnOnce(Arc<ServiceHandles>) -> S, 
[src]

pub fn into_inner(self) -> Arc<ServiceHandles>[src]

Trait Implementations

impl Clone for ServiceHandlesFuture[src]

impl Future for ServiceHandlesFuture[src]

type Output = Arc<ServiceHandles>

The type of value produced on completion.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.