pub enum OptRecordUpdate<R>where
R: Node,{
NoChange,
Clear,
Set(R),
Update {
update: R::Update,
insert: bool,
},
}Expand description
Update for an optional record
Variants§
NoChange
Do nothing
Clear
Remove the record.
If no record is present this is a noop.
Set(R)
Set the record to the provided value
Update
Update the record.
If no record is present, the insert flag controls whether a
default record is inserted before applying the update.
Trait Implementations§
Source§impl<R> Clone for OptRecordUpdate<R>
impl<R> Clone for OptRecordUpdate<R>
Source§fn clone(&self) -> OptRecordUpdate<R>
fn clone(&self) -> OptRecordUpdate<R>
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 moreSource§impl<R> Debug for OptRecordUpdate<R>
impl<R> Debug for OptRecordUpdate<R>
Source§impl<R> Default for OptRecordUpdate<R>where
R: Node,
impl<R> Default for OptRecordUpdate<R>where
R: Node,
Source§fn default() -> OptRecordUpdate<R>
fn default() -> OptRecordUpdate<R>
Returns the “default value” for a type. Read more
Source§impl<'de, R> Deserialize<'de> for OptRecordUpdate<R>
impl<'de, R> Deserialize<'de> for OptRecordUpdate<R>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<R> Hash for OptRecordUpdate<R>
impl<R> Hash for OptRecordUpdate<R>
Source§impl<R> PartialEq for OptRecordUpdate<R>
impl<R> PartialEq for OptRecordUpdate<R>
Source§impl<R> Serialize for OptRecordUpdate<R>
impl<R> Serialize for OptRecordUpdate<R>
impl<R> Eq for OptRecordUpdate<R>
impl<R> StructuralPartialEq for OptRecordUpdate<R>where
R: Node,
Auto Trait Implementations§
impl<R> Freeze for OptRecordUpdate<R>
impl<R> RefUnwindSafe for OptRecordUpdate<R>
impl<R> Send for OptRecordUpdate<R>
impl<R> Sync for OptRecordUpdate<R>
impl<R> Unpin for OptRecordUpdate<R>
impl<R> UnwindSafe for OptRecordUpdate<R>
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