pub struct PlaceholderGuard<'a, Key, Val, We, B, L> { /* private fields */ }Implementations§
Source§impl<'a, Key, Val, We, B, L> PlaceholderGuard<'a, Key, Val, We, B, L>
impl<'a, Key, Val, We, B, L> PlaceholderGuard<'a, Key, Val, We, B, L>
pub fn start_loading( lifecycle: &'a L, shard: &'a RwLock<CacheShard<Key, Val, We, B, L, Arc<Placeholder<Val>>>>, shared: Arc<Placeholder<Val>>, ) -> Self
Source§impl<'a, Key: Eq + Hash, Val: Clone, We: Weighter<Key, Val>, B: BuildHasher, L: Lifecycle<Key, Val>> PlaceholderGuard<'a, Key, Val, We, B, L>
impl<'a, Key: Eq + Hash, Val: Clone, We: Weighter<Key, Val>, B: BuildHasher, L: Lifecycle<Key, Val>> PlaceholderGuard<'a, Key, Val, We, B, L>
Source§impl<Key: Eq + Hash, Val: Clone, We: Weighter<Key, Val>, B: BuildHasher, L: Lifecycle<Key, Val>> PlaceholderGuard<'_, Key, Val, We, B, L>
impl<Key: Eq + Hash, Val: Clone, We: Weighter<Key, Val>, B: BuildHasher, L: Lifecycle<Key, Val>> PlaceholderGuard<'_, Key, Val, We, B, L>
Sourcepub fn insert(self, value: Val) -> Result<(), Val>
pub fn insert(self, value: Val) -> Result<(), Val>
Inserts the value into the placeholder
Returns Err if the placeholder isn’t in the cache anymore.
A placeholder can be removed as a result of a remove call
or a non-placeholder insert with the same key.
Sourcepub fn insert_with_lifecycle(self, value: Val) -> Result<L::RequestState, Val>
pub fn insert_with_lifecycle(self, value: Val) -> Result<L::RequestState, Val>
Inserts the value into the placeholder
Returns Err if the placeholder isn’t in the cache anymore.
A placeholder can be removed as a result of a remove call
or a non-placeholder insert with the same key.
Trait Implementations§
Source§impl<Key, Val, We, B, L> Debug for PlaceholderGuard<'_, Key, Val, We, B, L>
impl<Key, Val, We, B, L> Debug for PlaceholderGuard<'_, Key, Val, We, B, L>
Auto Trait Implementations§
impl<'a, Key, Val, We, B, L> Freeze for PlaceholderGuard<'a, Key, Val, We, B, L>
impl<'a, Key, Val, We, B, L> !RefUnwindSafe for PlaceholderGuard<'a, Key, Val, We, B, L>
impl<'a, Key, Val, We, B, L> Send for PlaceholderGuard<'a, Key, Val, We, B, L>
impl<'a, Key, Val, We, B, L> Sync for PlaceholderGuard<'a, Key, Val, We, B, L>
impl<'a, Key, Val, We, B, L> Unpin for PlaceholderGuard<'a, Key, Val, We, B, L>
impl<'a, Key, Val, We, B, L> !UnwindSafe for PlaceholderGuard<'a, 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