pub struct TimeMutationRequest {
pub issue: String,
pub intent: TimeIntent,
pub attribution: TimeAttribution,
}Expand description
One mutation request: the issue to resolve, the intent, and its attribution.
Self::edit and Self::delete take the reason as an argument rather than an
optional setter, because the contract requires one for those two actions: a
caller cannot forget it and then wonder why nothing happened. Validation still
refuses a blank one, so an empty flag does not become an empty audit line.
Fields§
§issue: StringThe issue selector, exactly as the caller typed it.
intent: TimeIntentWhat to do to its current entries.
attribution: TimeAttributionWho, when and why.
Implementations§
Source§impl TimeMutationRequest
impl TimeMutationRequest
Sourcepub fn create(issue: impl Into<String>, entry: NewTimeEntry) -> Self
pub fn create(issue: impl Into<String>, entry: NewTimeEntry) -> Self
A create request.
Sourcepub fn edit(
issue: impl Into<String>,
entry_id: impl Into<String>,
change: TimeEntryEdit,
reason: impl Into<String>,
) -> Self
pub fn edit( issue: impl Into<String>, entry_id: impl Into<String>, change: TimeEntryEdit, reason: impl Into<String>, ) -> Self
An edit request. The reason is required by the contract and is carried here.
Sourcepub fn delete(
issue: impl Into<String>,
entry_id: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn delete( issue: impl Into<String>, entry_id: impl Into<String>, reason: impl Into<String>, ) -> Self
A delete request. The reason is required by the contract and is carried here.
Trait Implementations§
Source§impl Clone for TimeMutationRequest
impl Clone for TimeMutationRequest
Source§impl Debug for TimeMutationRequest
impl Debug for TimeMutationRequest
impl Eq for TimeMutationRequest
Source§impl PartialEq for TimeMutationRequest
impl PartialEq for TimeMutationRequest
impl StructuralPartialEq for TimeMutationRequest
Auto Trait Implementations§
impl Freeze for TimeMutationRequest
impl RefUnwindSafe for TimeMutationRequest
impl Send for TimeMutationRequest
impl Sync for TimeMutationRequest
impl Unpin for TimeMutationRequest
impl UnsafeUnpin for TimeMutationRequest
impl UnwindSafe for TimeMutationRequest
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