pub struct PutOrUpdateRequest<Key, Value>{ /* private fields */ }Expand description
PutOrUpdateRequest encapsulates the fields that are required for a put or an update operation.
It is a parameter to put_or_update method of crate::cache::cached::CacheD.
It allows put operation with value, weight and time_to_live and also provides flexibility in updating just the value or the weight or the time_to_live or all of these for an existing key.
It also allows removing the time_to_live against an existing key. Either of time_to_live or remove_time_to_live can be provided.
If PutOrUpdateRequest results in a put operation, the flag remove_time_to_live will have no significance.
Auto Trait Implementations§
impl<Key, Value> Freeze for PutOrUpdateRequest<Key, Value>
impl<Key, Value> RefUnwindSafe for PutOrUpdateRequest<Key, Value>where
Key: RefUnwindSafe,
Value: RefUnwindSafe,
impl<Key, Value> Send for PutOrUpdateRequest<Key, Value>
impl<Key, Value> Sync for PutOrUpdateRequest<Key, Value>
impl<Key, Value> Unpin for PutOrUpdateRequest<Key, Value>
impl<Key, Value> UnwindSafe for PutOrUpdateRequest<Key, Value>where
Key: UnwindSafe,
Value: UnwindSafe,
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