pub enum TimeIntent {
Create(NewTimeEntry),
Edit {
entry_id: String,
change: TimeEntryEdit,
},
Delete {
entry_id: String,
},
}Expand description
One mutation intent (data-model §2): the create, edit or delete being asked for.
Variants§
Create(NewTimeEntry)
Add an entry to the current projection.
Edit
Correct the entry entry_id, naming the fields to replace.
Fields
§
change: TimeEntryEditThe fields to replace, leave and clear.
Delete
Remove entry_id from the current projection.
Implementations§
Source§impl TimeIntent
impl TimeIntent
Sourcepub fn entry_id(&self) -> Option<&str>
pub fn entry_id(&self) -> Option<&str>
The id this intent targets, when it names one. A create names one only when
the caller supplied it (NewTimeEntry::with_id).
Trait Implementations§
Source§impl Clone for TimeIntent
impl Clone for TimeIntent
Source§impl Debug for TimeIntent
impl Debug for TimeIntent
impl Eq for TimeIntent
Source§impl PartialEq for TimeIntent
impl PartialEq for TimeIntent
impl StructuralPartialEq for TimeIntent
Auto Trait Implementations§
impl Freeze for TimeIntent
impl RefUnwindSafe for TimeIntent
impl Send for TimeIntent
impl Sync for TimeIntent
impl Unpin for TimeIntent
impl UnsafeUnpin for TimeIntent
impl UnwindSafe for TimeIntent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more