[][src]Struct thingvellir::MutableServiceHandle

pub struct MutableServiceHandle<Key, Data>(_);

Implementations

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

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

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

Methods from Deref<Target = ServiceHandle<Key, Data>>

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 MutableServiceHandle<Key, Data>[src]

impl<Key, Data> Deref for MutableServiceHandle<Key, Data>[src]

type Target = ServiceHandle<Key, Data>

The resulting type after dereferencing.

impl<Key, Data> DerefMut for MutableServiceHandle<Key, Data>[src]

Auto Trait Implementations

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

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

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

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

impl<Key, Data> !UnwindSafe for MutableServiceHandle<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>,