#[non_exhaustive]pub struct LabelCreateInput {
pub name: String,
pub color: Option<String>,
pub description: Option<String>,
pub team_id: Option<TeamId>,
pub parent_id: Option<LabelId>,
pub is_group: Option<bool>,
}Expand description
Input for LabelsService::create (IssueLabelCreateInput).
§Example
use linear_api::TeamId;
use linear_api::labels::LabelCreateInput;
let client = linear_api::LinearClient::from_env()?;
let label = client
.labels()
.create(
LabelCreateInput::builder()
.name("bug")
.color("#BB87FC")
.team_id(TeamId::new("9c2c88a6-99d3-4a63-a201-8ee5c7dcc374"))
.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: StringLabel name (required).
color: Option<String>Label color as a hex string like "#BB87FC". Server-assigned when
omitted.
description: Option<String>Optional description.
team_id: Option<TeamId>Owning team. None creates a workspace-level label.
parent_id: Option<LabelId>Parent group to nest the label under.
is_group: Option<bool>Whether the label is a group.
Implementations§
Source§impl LabelCreateInput
impl LabelCreateInput
Sourcepub fn builder() -> LabelCreateInputBuilder
pub fn builder() -> LabelCreateInputBuilder
Create an instance of LabelCreateInput using the builder syntax
Trait Implementations§
Source§impl Clone for LabelCreateInput
impl Clone for LabelCreateInput
Source§fn clone(&self) -> LabelCreateInput
fn clone(&self) -> LabelCreateInput
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 LabelCreateInput
impl Debug for LabelCreateInput
Auto Trait Implementations§
impl Freeze for LabelCreateInput
impl RefUnwindSafe for LabelCreateInput
impl Send for LabelCreateInput
impl Sync for LabelCreateInput
impl Unpin for LabelCreateInput
impl UnsafeUnpin for LabelCreateInput
impl UnwindSafe for LabelCreateInput
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