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
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::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::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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.