pub struct IssuePatch {
pub title: Option<String>,
pub body: Option<String>,
pub status: Option<Status>,
pub priority: Option<Priority>,
pub labels: Option<Vec<String>>,
}Expand description
A precise update payload for crate::store::issues::FileIssueStore::apply_patch.
Every field is Option: None = keep the existing value, Some = replace
it. labels is the only field with a meaningful empty state —
Some(vec![]) clears all labels while None keeps them. This resolves
defect #3: through the tool schema, “field absent” vs [] were previously
indistinguishable, so labels could never be cleared without resending the
full set.
Used by the issue tool’s update action (via
crate::store::issues::FileIssueStore::apply_patch) and is the
recommended mutation surface for callers that want precise keep-vs-replace
semantics.
Fields§
§title: Option<String>Replace the title.
body: Option<String>Replace the markdown body.
status: Option<Status>Replace the status. Setting Status::Open also clears closed_at
(see crate::store::issues::FileIssueStore::apply_patch, which fixes
the latent reopen bug #4).
priority: Option<Priority>Replace the priority.
labels: Option<Vec<String>>Replace the labels wholesale. Some(vec![]) clears all labels.
Trait Implementations§
Source§impl Clone for IssuePatch
impl Clone for IssuePatch
Source§fn clone(&self) -> IssuePatch
fn clone(&self) -> IssuePatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IssuePatch
impl Debug for IssuePatch
Source§impl Default for IssuePatch
impl Default for IssuePatch
Source§fn default() -> IssuePatch
fn default() -> IssuePatch
Auto Trait Implementations§
impl Freeze for IssuePatch
impl RefUnwindSafe for IssuePatch
impl Send for IssuePatch
impl Sync for IssuePatch
impl Unpin for IssuePatch
impl UnsafeUnpin for IssuePatch
impl UnwindSafe for IssuePatch
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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