pub trait SolutionShape<SolId: Id, SInfo: SolInfo>:
Linked
+ HasId<SolId>
+ HasSolInfo<SInfo>
+ Debug
+ Sizedwhere
Self: Serialize + for<'a> Deserialize<'a>,{
type SolObj: Solution<SolId, Self::Obj, SInfo>;
type SolOpt: Solution<SolId, Self::Opt, SInfo>;
// Required methods
fn get_sobj(&self) -> &Self::SolObj;
fn get_sopt(&self) -> &Self::SolOpt;
fn get_mut_sobj(&mut self) -> &mut Self::SolObj;
fn get_mut_sopt(&mut self) -> &mut Self::SolOpt;
fn extract_sobj(self) -> Self::SolObj;
fn extract_sopt(self) -> Self::SolOpt;
fn _clone_shape(&self) -> Self;
}Expand description
Trait linking objective- and optimizer-side solutions with a shared Id.
Required Associated Types§
Required Methods§
Sourcefn get_mut_sobj(&mut self) -> &mut Self::SolObj
fn get_mut_sobj(&mut self) -> &mut Self::SolObj
Get a mutable reference to the objective-side solution.
Sourcefn get_mut_sopt(&mut self) -> &mut Self::SolOpt
fn get_mut_sopt(&mut self) -> &mut Self::SolOpt
Get a mutable reference to the optimizer-side solution.
Sourcefn extract_sobj(self) -> Self::SolObj
fn extract_sobj(self) -> Self::SolObj
Extract the objective-side solution, consuming the shape.
Sourcefn extract_sopt(self) -> Self::SolOpt
fn extract_sopt(self) -> Self::SolOpt
Extract the optimizer-side solution, consuming the shape.
Sourcefn _clone_shape(&self) -> Self
fn _clone_shape(&self) -> Self
Creates a clone of this shape with the same solutions, metadata, and Id, used
for Accumulator.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".