#[non_exhaustive]pub enum StoreOp<K> {
Upsert(K),
Remove(K),
Ignore,
}Expand description
What a reflector should do to its Store for a given event.
Returned by the closure passed to ReflectExt::reflect. The
closure inspects the event payload (which, for nlink’s typed
event enums, already encodes add-vs-delete) and picks the op.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Upsert(K)
Insert or replace the value under this key.
Remove(K)
Remove the entry under this key, if present.
Ignore
Leave the store unchanged (event not relevant to this cache).
Trait Implementations§
impl<K: Eq> Eq for StoreOp<K>
Source§impl<K: PartialEq> PartialEq for StoreOp<K>
impl<K: PartialEq> PartialEq for StoreOp<K>
impl<K: PartialEq> StructuralPartialEq for StoreOp<K>
Auto Trait Implementations§
impl<K> Freeze for StoreOp<K>where
K: Freeze,
impl<K> RefUnwindSafe for StoreOp<K>where
K: RefUnwindSafe,
impl<K> Send for StoreOp<K>where
K: Send,
impl<K> Sync for StoreOp<K>where
K: Sync,
impl<K> Unpin for StoreOp<K>where
K: Unpin,
impl<K> UnsafeUnpin for StoreOp<K>where
K: UnsafeUnpin,
impl<K> UnwindSafe for StoreOp<K>where
K: 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