pub enum OptimizationResponse {
Assignment {
assignments: Vec<usize>,
total_cost: i64,
},
Knapsack {
selected: Vec<usize>,
total_value: i64,
total_weight: i64,
},
ShortestPath {
path: Vec<usize>,
cost: i64,
},
Error {
message: String,
},
}Expand description
Response from optimization
Variants§
Assignment
Assignment solution
Knapsack
Knapsack solution
Fields
ShortestPath
Shortest path solution
Error
Error response
Trait Implementations§
Source§impl Clone for OptimizationResponse
impl Clone for OptimizationResponse
Source§fn clone(&self) -> OptimizationResponse
fn clone(&self) -> OptimizationResponse
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 OptimizationResponse
impl Debug for OptimizationResponse
Source§impl<'de> Deserialize<'de> for OptimizationResponse
impl<'de> Deserialize<'de> for OptimizationResponse
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 OptimizationResponse
impl RefUnwindSafe for OptimizationResponse
impl Send for OptimizationResponse
impl Sync for OptimizationResponse
impl Unpin for OptimizationResponse
impl UnsafeUnpin for OptimizationResponse
impl UnwindSafe for OptimizationResponse
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