pub struct JoinFuture<'a, 'b, Q: ?Sized, Key, Val, We, B, L> {
lifecycle: &'a L,
shard: &'a RwLock<CacheShard<Key, Val, We, B, L, Arc<Placeholder<Val>>>>,
state: JoinFutureState<'b, Q, Val>,
notified: AtomicBool,
}Expand description
Future that results in an Ok(Value) or Err(Guard)
Fields§
§lifecycle: &'a L§shard: &'a RwLock<CacheShard<Key, Val, We, B, L, Arc<Placeholder<Val>>>>§state: JoinFutureState<'b, Q, Val>§notified: AtomicBoolImplementations§
Source§impl<'a, 'b, Q: ?Sized, Key, Val, We, B, L> JoinFuture<'a, 'b, Q, Key, Val, We, B, L>
impl<'a, 'b, Q: ?Sized, Key, Val, We, B, L> JoinFuture<'a, 'b, Q, Key, Val, We, B, L>
pub fn new( lifecycle: &'a L, shard: &'a RwLock<CacheShard<Key, Val, We, B, L, Arc<Placeholder<Val>>>>, hash: u64, key: &'b Q, ) -> JoinFuture<'a, 'b, Q, Key, Val, We, B, L> ⓘ
fn drop_pending_waiter(&mut self)
Trait Implementations§
Source§impl<Q: ?Sized, Key, Val, We, B, L> Drop for JoinFuture<'_, '_, Q, Key, Val, We, B, L>
impl<Q: ?Sized, Key, Val, We, B, L> Drop for JoinFuture<'_, '_, Q, Key, Val, We, B, L>
Source§impl<'a, Key: Eq + Hash, Q: Hash + Equivalent<Key> + ToOwned<Owned = Key> + ?Sized, Val: Clone, We: Weighter<Key, Val>, B: BuildHasher, L: Lifecycle<Key, Val>> Future for JoinFuture<'a, '_, Q, Key, Val, We, B, L>
impl<'a, Key: Eq + Hash, Q: Hash + Equivalent<Key> + ToOwned<Owned = Key> + ?Sized, Val: Clone, We: Weighter<Key, Val>, B: BuildHasher, L: Lifecycle<Key, Val>> Future for JoinFuture<'a, '_, Q, Key, Val, We, B, L>
Source§type Output = Result<Val, PlaceholderGuard<'a, Key, Val, We, B, L>>
type Output = Result<Val, PlaceholderGuard<'a, Key, Val, We, B, L>>
The type of value produced on completion.
Auto Trait Implementations§
impl<'a, 'b, Q, Key, Val, We, B, L> !Freeze for JoinFuture<'a, 'b, Q, Key, Val, We, B, L>
impl<'a, 'b, Q, Key, Val, We, B, L> RefUnwindSafe for JoinFuture<'a, 'b, Q, Key, Val, We, B, L>
impl<'a, 'b, Q, Key, Val, We, B, L> Send for JoinFuture<'a, 'b, Q, Key, Val, We, B, L>
impl<'a, 'b, Q, Key, Val, We, B, L> Sync for JoinFuture<'a, 'b, Q, Key, Val, We, B, L>
impl<'a, 'b, Q, Key, Val, We, B, L> Unpin for JoinFuture<'a, 'b, Q, Key, Val, We, B, L>where
Q: ?Sized,
impl<'a, 'b, Q, Key, Val, We, B, L> UnwindSafe for JoinFuture<'a, 'b, Q, Key, Val, We, B, L>
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<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more