pub struct TaskCreateBuilder { /* private fields */ }Expand description
Builder for constructing validated task create payloads.
Implementations§
Source§impl TaskCreateBuilder
impl TaskCreateBuilder
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Start building a new task payload with the required name.
Sourcepub fn html_notes(self, notes: impl Into<String>) -> Self
pub fn html_notes(self, notes: impl Into<String>) -> Self
Provide HTML formatted notes.
Sourcepub fn section(self, section: impl Into<String>) -> Self
pub fn section(self, section: impl Into<String>) -> Self
Target a specific section gid when creating within a project.
Sourcepub fn parent(self, parent: impl Into<String>) -> Self
pub fn parent(self, parent: impl Into<String>) -> Self
Set the parent task gid to create a subtask.
Sourcepub fn assignee(self, assignee: impl Into<String>) -> Self
pub fn assignee(self, assignee: impl Into<String>) -> Self
Assign the task to a user (gid or email).
Sourcepub fn custom_field(
self,
field_gid: impl Into<String>,
value: CustomFieldValue,
) -> Self
pub fn custom_field( self, field_gid: impl Into<String>, value: CustomFieldValue, ) -> Self
Assign a custom field value.
Sourcepub fn build(self) -> Result<TaskCreateRequest, TaskValidationError>
pub fn build(self) -> Result<TaskCreateRequest, TaskValidationError>
Finalise the builder into a request payload performing validation.
§Errors
Returns a validation error if mandatory fields are missing or invalid.
Trait Implementations§
Source§impl Clone for TaskCreateBuilder
impl Clone for TaskCreateBuilder
Source§fn clone(&self) -> TaskCreateBuilder
fn clone(&self) -> TaskCreateBuilder
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 moreAuto Trait Implementations§
impl Freeze for TaskCreateBuilder
impl RefUnwindSafe for TaskCreateBuilder
impl Send for TaskCreateBuilder
impl Sync for TaskCreateBuilder
impl Unpin for TaskCreateBuilder
impl UnsafeUnpin for TaskCreateBuilder
impl UnwindSafe for TaskCreateBuilder
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