Struct thingvellir::ServiceHandle[][src]

pub struct ServiceHandle<Key, Data> { /* fields omitted */ }

Implementations

impl<Key: Send + Hash, Data> ServiceHandle<Key, Data>[src]

pub fn handle(&self) -> Self[src]

pub fn execute<'a, F, T>(
    &'a mut self,
    key: Key,
    func: F
) -> impl Future<Output = Result<T, ShardError>> + 'a where
    F: FnOnce(&Data) -> T + Send + 'static,
    T: Send + 'static, 
[src]

pub fn execute_if_cached<'a, F, T>(
    &'a mut self,
    key: Key,
    func: F
) -> impl Future<Output = Result<Option<T>, ShardError>> + 'a where
    F: FnOnce(&Data) -> T + Send + 'static,
    T: Send + 'static, 
[src]

pub fn take_data<'a>(
    &'a mut self,
    key: Key
) -> impl Future<Output = Result<Option<TakenData<Key, Data>>, ShardError>> + 'a
[src]

pub async fn get_shard_stats(&mut self) -> Result<Vec<ShardStats>, ShardError>[src]

Trait Implementations

impl<Key, Data> Clone for ServiceHandle<Key, Data>[src]

Auto Trait Implementations

impl<Key, Data> !RefUnwindSafe for ServiceHandle<Key, Data>

impl<Key, Data> Send for ServiceHandle<Key, Data> where
    Data: Send,
    Key: Send

impl<Key, Data> Sync for ServiceHandle<Key, Data> where
    Data: Send,
    Key: Send

impl<Key, Data> Unpin for ServiceHandle<Key, Data>

impl<Key, Data> !UnwindSafe for ServiceHandle<Key, Data>

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, 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,