pub struct CreateExpenseRequest<'a> {
pub user_id: Option<i64>,
pub project_id: Option<i64>,
pub expense_category_id: Option<i64>,
pub spent_date: Option<String>,
pub units: Option<i64>,
pub total_cost: Option<f64>,
pub notes: Option<String>,
pub billable: Option<bool>,
pub receipt: Option<String>,
/* private fields */
}Expand description
Create this with the associated client method.
That method takes required values as arguments. Set optional values using builder methods on this struct.
Fields§
§user_id: Option<i64>§project_id: Option<i64>§expense_category_id: Option<i64>§spent_date: Option<String>§units: Option<i64>§total_cost: Option<f64>§notes: Option<String>§billable: Option<bool>§receipt: Option<String>Implementations§
Source§impl<'a> CreateExpenseRequest<'a>
impl<'a> CreateExpenseRequest<'a>
pub async fn send(self) -> Result<Expense>
pub fn user_id(self, user_id: i64) -> Self
pub fn project_id(self, project_id: i64) -> Self
pub fn expense_category_id(self, expense_category_id: i64) -> Self
pub fn spent_date(self, spent_date: &str) -> Self
pub fn units(self, units: i64) -> Self
pub fn total_cost(self, total_cost: f64) -> Self
pub fn notes(self, notes: &str) -> Self
pub fn billable(self, billable: bool) -> Self
pub fn receipt(self, receipt: &str) -> Self
Auto Trait Implementations§
impl<'a> Freeze for CreateExpenseRequest<'a>
impl<'a> !RefUnwindSafe for CreateExpenseRequest<'a>
impl<'a> Send for CreateExpenseRequest<'a>
impl<'a> Sync for CreateExpenseRequest<'a>
impl<'a> Unpin for CreateExpenseRequest<'a>
impl<'a> !UnwindSafe for CreateExpenseRequest<'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