#[non_exhaustive]pub struct LabelUpdateInput {
pub name: Option<String>,
pub color: Option<String>,
pub description: Undefinable<String>,
pub parent_id: Undefinable<LabelId>,
}Expand description
Input for LabelsService::update (IssueLabelUpdateInput).
description and parent_id are clearable: Undefinable::Undefined
(the default) leaves the field unchanged, Undefinable::Null clears it,
and a value sets it.
§Example
use linear_api::{LabelId, Undefinable};
use linear_api::labels::LabelUpdateInput;
let client = linear_api::LinearClient::from_env()?;
let label = client
.labels()
.update(
&LabelId::new("3d5a8ea4-9e4b-4caf-8d6f-1d914a518790"),
LabelUpdateInput::builder()
.name("triage")
.description(Undefinable::Null) // clear the description
.build(),
)
.await?;Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Option<String>New label name.
color: Option<String>New color as a hex string like "#BB87FC".
description: Undefinable<String>Description: set, clear (Null), or leave unchanged (Undefined).
parent_id: Undefinable<LabelId>Parent group: set, clear (Null), or leave unchanged (Undefined).
Implementations§
Source§impl LabelUpdateInput
impl LabelUpdateInput
Sourcepub fn builder() -> LabelUpdateInputBuilder
pub fn builder() -> LabelUpdateInputBuilder
Create an instance of LabelUpdateInput using the builder syntax
Trait Implementations§
Source§impl Clone for LabelUpdateInput
impl Clone for LabelUpdateInput
Source§fn clone(&self) -> LabelUpdateInput
fn clone(&self) -> LabelUpdateInput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LabelUpdateInput
impl Debug for LabelUpdateInput
Source§impl Default for LabelUpdateInput
impl Default for LabelUpdateInput
Source§fn default() -> LabelUpdateInput
fn default() -> LabelUpdateInput
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LabelUpdateInput
impl RefUnwindSafe for LabelUpdateInput
impl Send for LabelUpdateInput
impl Sync for LabelUpdateInput
impl Unpin for LabelUpdateInput
impl UnsafeUnpin for LabelUpdateInput
impl UnwindSafe for LabelUpdateInput
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