pub enum RichUpdate<T> {
Created {
key: String,
data: T,
},
Updated {
key: String,
before: T,
after: T,
patch: Option<Value>,
},
Deleted {
key: String,
last_known: Option<T>,
},
}Variants§
Implementations§
Source§impl<T> RichUpdate<T>
impl<T> RichUpdate<T>
pub fn key(&self) -> &str
pub fn data(&self) -> Option<&T>
pub fn before(&self) -> Option<&T>
pub fn into_data(self) -> Option<T>
pub fn is_created(&self) -> bool
pub fn is_updated(&self) -> bool
pub fn is_deleted(&self) -> bool
pub fn patch(&self) -> Option<&Value>
pub fn has_patch_field(&self, field: &str) -> bool
Trait Implementations§
Source§impl<T: Clone> Clone for RichUpdate<T>
impl<T: Clone> Clone for RichUpdate<T>
Source§fn clone(&self) -> RichUpdate<T>
fn clone(&self) -> RichUpdate<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for RichUpdate<T>where
T: Freeze,
impl<T> RefUnwindSafe for RichUpdate<T>where
T: RefUnwindSafe,
impl<T> Send for RichUpdate<T>where
T: Send,
impl<T> Sync for RichUpdate<T>where
T: Sync,
impl<T> Unpin for RichUpdate<T>where
T: Unpin,
impl<T> UnwindSafe for RichUpdate<T>where
T: 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