pub struct StatusChange<'a> {
pub column: &'a str,
pub commit: Option<&'a str>,
pub override_reason: Option<&'a str>,
}Expand description
A request to move an issue to a column, through the seam.
WP03 T013. A struct rather than a positional list because the three arguments
are all Option-shaped and adjacent: (Some(commit), None, None) is a mistake
waiting to happen at a call site, and the field names are what stop it.
§Deliberately absent
No actor. The seam records the identity itself through
actor_identity, so a caller cannot attribute a decision to somebody else
and the audit trail keeps one definition of “who acted”. Passing an actor in
would make the attribution a choice of the caller, which is exactly the thing
an audit trail must not be.
No updated. The seam bumps it, on exactly the transitions that change
something. A caller supplying it would be able to write a file whose date says
a no-op was an edit.
Fields§
§column: &'a strThe column to move to. A column the board does not configure is refused
with unknown_column; a same-column request is accepted and inert.
commit: Option<&'a str>The commit to record when this move reaches the board’s completion column.
Ignored on a move that does not reach completion, and a previously recorded
commit is cleared on a move that leaves it. None therefore means “record
nothing”, which is distinct from “leave the old value alone” — leaving an
issue in its completion column with an unrelated commit is what the clear
exists to prevent.
override_reason: Option<&'a str>Why a policy rule was being overridden, when one was.
Without a reason the service refuses a transition out of a terminal
category outright, so this is the only way out of done. The CLI flag that
supplies it lands in WP04; the seam takes the parameter now so a
half-built seam — one that can refuse but never accept-with-reason — is
never what ships.
Implementations§
Source§impl<'a> StatusChange<'a>
impl<'a> StatusChange<'a>
Sourcepub fn to(column: &'a str) -> Self
pub fn to(column: &'a str) -> Self
A plain move: no commit, no override.
The common case, named so the call site reads as “move it” rather than as
three Nones.
Sourcepub fn with_commit(self, commit: Option<&'a str>) -> Self
pub fn with_commit(self, commit: Option<&'a str>) -> Self
This request with a commit, for a move that reaches completion.
Sourcepub fn with_override(self, reason: Option<&'a str>) -> Self
pub fn with_override(self, reason: Option<&'a str>) -> Self
This request with an override reason, for a move out of a terminal category.
Trait Implementations§
Source§impl<'a> Clone for StatusChange<'a>
impl<'a> Clone for StatusChange<'a>
Source§impl<'a> Debug for StatusChange<'a>
impl<'a> Debug for StatusChange<'a>
impl<'a> Eq for StatusChange<'a>
Source§impl<'a> PartialEq for StatusChange<'a>
impl<'a> PartialEq for StatusChange<'a>
impl<'a> StructuralPartialEq for StatusChange<'a>
Auto Trait Implementations§
impl<'a> Freeze for StatusChange<'a>
impl<'a> RefUnwindSafe for StatusChange<'a>
impl<'a> Send for StatusChange<'a>
impl<'a> Sync for StatusChange<'a>
impl<'a> Unpin for StatusChange<'a>
impl<'a> UnsafeUnpin for StatusChange<'a>
impl<'a> UnwindSafe for StatusChange<'a>
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
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
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> ⓘ
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> ⓘ
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