Struct thingvellir::ServiceHandle [−][src]
pub struct ServiceHandle<Key, Data> { /* fields omitted */ }
Implementations
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,
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,
pub fn take_data<'a>(
&'a mut self,
key: Key
) -> impl Future<Output = Result<Option<TakenData<Key, Data>>, ShardError>> + 'a
Trait Implementations
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
Mutably borrows from an owned value. Read more