pub struct BudgetAllocationInput {
pub total_budget: f64,
pub categories: Vec<BudgetCategory>,
pub constraints: AllocationConstraints,
}Expand description
Input for budget allocation optimization
Fields§
§total_budget: f64Total budget to allocate
categories: Vec<BudgetCategory>Categories to allocate budget to
constraints: AllocationConstraintsAllocation constraints
Implementations§
Source§impl BudgetAllocationInput
impl BudgetAllocationInput
Sourcepub fn get_category(&self, id: &str) -> Option<&BudgetCategory>
pub fn get_category(&self, id: &str) -> Option<&BudgetCategory>
Get category by ID
Trait Implementations§
Source§impl Clone for BudgetAllocationInput
impl Clone for BudgetAllocationInput
Source§fn clone(&self) -> BudgetAllocationInput
fn clone(&self) -> BudgetAllocationInput
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 BudgetAllocationInput
impl Debug for BudgetAllocationInput
Source§impl Default for BudgetAllocationInput
impl Default for BudgetAllocationInput
Source§fn default() -> BudgetAllocationInput
fn default() -> BudgetAllocationInput
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BudgetAllocationInput
impl<'de> Deserialize<'de> for BudgetAllocationInput
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
Auto Trait Implementations§
impl Freeze for BudgetAllocationInput
impl RefUnwindSafe for BudgetAllocationInput
impl Send for BudgetAllocationInput
impl Sync for BudgetAllocationInput
impl Unpin for BudgetAllocationInput
impl UnsafeUnpin for BudgetAllocationInput
impl UnwindSafe for BudgetAllocationInput
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