Struct redmine_api::api::time_entries::CreateTimeEntryBuilder
source · [−]pub struct CreateTimeEntryBuilder<'a> { /* private fields */ }
Expand description
Builder for CreateTimeEntry
.
Implementations
sourceimpl<'a> CreateTimeEntryBuilder<'a>
impl<'a> CreateTimeEntryBuilder<'a>
sourcepub fn issue_id(&mut self, value: u64) -> &mut Self
pub fn issue_id(&mut self, value: u64) -> &mut Self
Issue id is required if project_id is not specified
sourcepub fn project_id(&mut self, value: u64) -> &mut Self
pub fn project_id(&mut self, value: u64) -> &mut Self
Project id is required if issue_id is not specified
sourcepub fn spent_on(&mut self, value: Date) -> &mut Self
pub fn spent_on(&mut self, value: Date) -> &mut Self
The date the time was spent, default is today
sourcepub fn activity_id(&mut self, value: u64) -> &mut Self
pub fn activity_id(&mut self, value: u64) -> &mut Self
This is required unless there is a default activity defined in Redmine
sourcepub fn comments(&mut self, value: Cow<'a, str>) -> &mut Self
pub fn comments(&mut self, value: Cow<'a, str>) -> &mut Self
Short description for the entry (255 characters max)
sourcepub fn user_id(&mut self, value: u64) -> &mut Self
pub fn user_id(&mut self, value: u64) -> &mut Self
User Id is only required when posting time on behalf of another user, defaults to current user
sourcepub fn build(&self) -> Result<CreateTimeEntry<'a>, CreateTimeEntryBuilderError>
pub fn build(&self) -> Result<CreateTimeEntry<'a>, CreateTimeEntryBuilderError>
Trait Implementations
sourceimpl<'a> Clone for CreateTimeEntryBuilder<'a>
impl<'a> Clone for CreateTimeEntryBuilder<'a>
sourcefn clone(&self) -> CreateTimeEntryBuilder<'a>
fn clone(&self) -> CreateTimeEntryBuilder<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for CreateTimeEntryBuilder<'a>
impl<'a> Send for CreateTimeEntryBuilder<'a>
impl<'a> Sync for CreateTimeEntryBuilder<'a>
impl<'a> Unpin for CreateTimeEntryBuilder<'a>
impl<'a> UnwindSafe for CreateTimeEntryBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more