pub struct IncomeService<'a> { /* private fields */ }Expand description
Service for income expectation management
Implementations§
Source§impl<'a> IncomeService<'a>
impl<'a> IncomeService<'a>
Sourcepub fn set_expected_income(
&self,
period: &BudgetPeriod,
amount: Money,
notes: Option<String>,
) -> EnvelopeResult<IncomeExpectation>
pub fn set_expected_income( &self, period: &BudgetPeriod, amount: Money, notes: Option<String>, ) -> EnvelopeResult<IncomeExpectation>
Set expected income for a period
Sourcepub fn get_expected_income(&self, period: &BudgetPeriod) -> Option<Money>
pub fn get_expected_income(&self, period: &BudgetPeriod) -> Option<Money>
Get expected income amount for a period
Sourcepub fn get_income_expectation(
&self,
period: &BudgetPeriod,
) -> Option<IncomeExpectation>
pub fn get_income_expectation( &self, period: &BudgetPeriod, ) -> Option<IncomeExpectation>
Get the full income expectation for a period
Sourcepub fn delete_expected_income(
&self,
period: &BudgetPeriod,
) -> EnvelopeResult<bool>
pub fn delete_expected_income( &self, period: &BudgetPeriod, ) -> EnvelopeResult<bool>
Delete income expectation for a period
Sourcepub fn get_all_expectations(&self) -> EnvelopeResult<Vec<IncomeExpectation>>
pub fn get_all_expectations(&self) -> EnvelopeResult<Vec<IncomeExpectation>>
Get all income expectations
Auto Trait Implementations§
impl<'a> Freeze for IncomeService<'a>
impl<'a> RefUnwindSafe for IncomeService<'a>
impl<'a> Send for IncomeService<'a>
impl<'a> Sync for IncomeService<'a>
impl<'a> Unpin for IncomeService<'a>
impl<'a> UnwindSafe for IncomeService<'a>
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> 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