pub struct TimeEstimate {
pub id: Option<i64>,
pub project_id: i64,
pub task_name: String,
pub estimated_hours: f64,
pub actual_hours: Option<f64>,
pub status: EstimateStatus,
pub due_date: Option<NaiveDate>,
pub completed_at: Option<DateTime<Utc>>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Fields§
§id: Option<i64>§project_id: i64§task_name: String§estimated_hours: f64§actual_hours: Option<f64>§status: EstimateStatus§due_date: Option<NaiveDate>§completed_at: Option<DateTime<Utc>>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl TimeEstimate
impl TimeEstimate
pub fn new(project_id: i64, task_name: String, estimated_hours: f64) -> Self
pub fn with_due_date(self, due_date: Option<NaiveDate>) -> Self
pub fn record_actual(&mut self, hours: f64)
pub fn variance(&self) -> Option<f64>
pub fn variance_percentage(&self) -> Option<f64>
pub fn is_over_estimate(&self) -> bool
pub fn is_under_estimate(&self) -> bool
Trait Implementations§
Source§impl Clone for TimeEstimate
impl Clone for TimeEstimate
Source§fn clone(&self) -> TimeEstimate
fn clone(&self) -> TimeEstimate
Returns a duplicate of the value. Read more
1.0.0 · 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 TimeEstimate
impl Debug for TimeEstimate
Source§impl<'de> Deserialize<'de> for TimeEstimate
impl<'de> Deserialize<'de> for TimeEstimate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TimeEstimate
impl PartialEq for TimeEstimate
Source§impl Serialize for TimeEstimate
impl Serialize for TimeEstimate
impl StructuralPartialEq for TimeEstimate
Auto Trait Implementations§
impl Freeze for TimeEstimate
impl RefUnwindSafe for TimeEstimate
impl Send for TimeEstimate
impl Sync for TimeEstimate
impl Unpin for TimeEstimate
impl UnwindSafe for TimeEstimate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more