Skip to main content

TaskBuilder

Struct TaskBuilder 

Source
pub struct TaskBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> TaskBuilder<S>

Source

pub fn build(self) -> Task
where S: IsComplete,

Finish building and return the requested object

Source

pub fn location_id(self, value: LocationId) -> TaskBuilder<SetLocationId<S>>
where S::LocationId: IsUnset,

Required.

Location id fact promoted into this staff contract.

Source

pub fn kind(self, value: Kind) -> TaskBuilder<SetKind<S>>
where S::Kind: IsUnset,

Required.

Kind fact promoted into this staff contract.

Source

pub fn title(self, value: Title) -> TaskBuilder<SetTitle<S>>
where S::Title: IsUnset,

Required.

Title fact promoted into this staff contract.

Source

pub fn status(self, value: Status) -> TaskBuilder<SetStatus<S>>
where S::Status: IsUnset,

Required.

Status fact promoted into this staff contract.

Source

pub fn priority(self, value: Priority) -> TaskBuilder<SetPriority<S>>
where S::Priority: IsUnset,

Required.

Priority fact promoted into this staff contract.

Source

pub fn due_at(self, value: DateTime<Utc>) -> TaskBuilder<SetDueAt<S>>
where S::DueAt: IsUnset,

Required.

Due at fact promoted into this staff contract.

Source

pub fn assignment(self, value: Assignment) -> TaskBuilder<SetAssignment<S>>
where S::Assignment: IsUnset,

Required.

Assignment fact promoted into this staff contract.

Source

pub fn source(self, value: Source) -> TaskBuilder<SetSource<S>>
where S::Source: IsUnset,

Required.

Source fact promoted into this staff contract.

Source

pub fn completion_evidence( self, value: Evidence, ) -> TaskBuilder<SetCompletionEvidence<S>>
where S::CompletionEvidence: IsUnset,

Optional (Some / Option setters). Completion evidence fact promoted into this staff contract.

Source

pub fn maybe_completion_evidence( self, value: Option<Evidence>, ) -> TaskBuilder<SetCompletionEvidence<S>>
where S::CompletionEvidence: IsUnset,

Optional (Some / Option setters). Completion evidence fact promoted into this staff contract.

Auto Trait Implementations§

§

impl<S> Freeze for TaskBuilder<S>

§

impl<S> RefUnwindSafe for TaskBuilder<S>

§

impl<S> Send for TaskBuilder<S>

§

impl<S> Sync for TaskBuilder<S>

§

impl<S> Unpin for TaskBuilder<S>

§

impl<S> UnsafeUnpin for TaskBuilder<S>

§

impl<S> UnwindSafe for TaskBuilder<S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.