Struct thingvellir::ServiceHandle
source · pub struct ServiceHandle<Key, Data> { /* private fields */ }
Implementations§
source§impl<Key: Send + Hash, Data: ServiceData> ServiceHandle<Key, Data>
impl<Key: Send + Hash, Data: ServiceData> ServiceHandle<Key, Data>
pub fn handle(&self) -> Self
pub fn execute<F, T>( &mut self, key: Key, func: F, ) -> impl Future<Output = Result<T, ShardError>> + '_
pub fn execute_if_cached<F, T>( &mut self, key: Key, func: F, ) -> impl Future<Output = Result<Option<T>, ShardError>> + '_
pub fn take_data( &mut self, key: Key, ) -> impl Future<Output = Result<Option<TakenData<Key, Data>>, ShardError>> + '_
pub async fn get_shard_stats(&mut self) -> Result<Vec<ShardStats>, ShardError>
Trait Implementations§
Auto Trait Implementations§
impl<Key, Data> Freeze for ServiceHandle<Key, Data>
impl<Key, Data> !RefUnwindSafe for ServiceHandle<Key, Data>
impl<Key, Data> Send for ServiceHandle<Key, Data>
impl<Key, Data> Sync for ServiceHandle<Key, Data>
impl<Key, Data> Unpin for ServiceHandle<Key, Data>
impl<Key, Data> !UnwindSafe for ServiceHandle<Key, Data>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)