pub enum ProblemChangeDto {
AddEntity {
entity_class: String,
entity_id: String,
entity: Value,
collection_path: String,
},
RemoveEntity {
entity_class: String,
entity_id: String,
collection_path: String,
},
ChangeVariable {
entity_class: String,
entity_id: String,
variable_name: String,
new_value: Value,
},
AddProblemFact {
fact_class: String,
fact_id: String,
fact: Value,
collection_path: String,
},
RemoveProblemFact {
fact_class: String,
fact_id: String,
collection_path: String,
},
ChangeProblemProperty {
object_class: String,
object_id: String,
property_name: String,
new_value: Value,
},
Batch {
changes: Vec<ProblemChangeDto>,
},
}Expand description
Serializable DTO for transmitting problem changes to the solver service.
Variants§
AddEntity
Add a planning entity.
Fields
RemoveEntity
Remove a planning entity.
Fields
ChangeVariable
Change a planning variable.
Fields
AddProblemFact
Add a problem fact.
Fields
RemoveProblemFact
Remove a problem fact.
Fields
ChangeProblemProperty
Change a property on an entity or problem fact.
Fields
Batch
A batch of problem changes to apply atomically.
Fields
§
changes: Vec<ProblemChangeDto>The changes to apply in order.
Implementations§
Source§impl ProblemChangeDto
impl ProblemChangeDto
Sourcepub fn add_entity(
entity_class: impl Into<String>,
entity_id: impl Into<String>,
entity: Value,
collection_path: impl Into<String>,
) -> Self
pub fn add_entity( entity_class: impl Into<String>, entity_id: impl Into<String>, entity: Value, collection_path: impl Into<String>, ) -> Self
Create an AddEntity change.
Sourcepub fn remove_entity(
entity_class: impl Into<String>,
entity_id: impl Into<String>,
collection_path: impl Into<String>,
) -> Self
pub fn remove_entity( entity_class: impl Into<String>, entity_id: impl Into<String>, collection_path: impl Into<String>, ) -> Self
Create a RemoveEntity change.
Sourcepub fn change_variable(
entity_class: impl Into<String>,
entity_id: impl Into<String>,
variable_name: impl Into<String>,
new_value: Value,
) -> Self
pub fn change_variable( entity_class: impl Into<String>, entity_id: impl Into<String>, variable_name: impl Into<String>, new_value: Value, ) -> Self
Create a ChangeVariable change.
Sourcepub fn add_problem_fact(
fact_class: impl Into<String>,
fact_id: impl Into<String>,
fact: Value,
collection_path: impl Into<String>,
) -> Self
pub fn add_problem_fact( fact_class: impl Into<String>, fact_id: impl Into<String>, fact: Value, collection_path: impl Into<String>, ) -> Self
Create an AddProblemFact change.
Sourcepub fn remove_problem_fact(
fact_class: impl Into<String>,
fact_id: impl Into<String>,
collection_path: impl Into<String>,
) -> Self
pub fn remove_problem_fact( fact_class: impl Into<String>, fact_id: impl Into<String>, collection_path: impl Into<String>, ) -> Self
Create a RemoveProblemFact change.
Sourcepub fn change_problem_property(
object_class: impl Into<String>,
object_id: impl Into<String>,
property_name: impl Into<String>,
new_value: Value,
) -> Self
pub fn change_problem_property( object_class: impl Into<String>, object_id: impl Into<String>, property_name: impl Into<String>, new_value: Value, ) -> Self
Create a ChangeProblemProperty change.
Sourcepub fn batch(changes: Vec<ProblemChangeDto>) -> Self
pub fn batch(changes: Vec<ProblemChangeDto>) -> Self
Create a batch of changes.
Trait Implementations§
Source§impl Clone for ProblemChangeDto
impl Clone for ProblemChangeDto
Source§fn clone(&self) -> ProblemChangeDto
fn clone(&self) -> ProblemChangeDto
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 ProblemChangeDto
impl Debug for ProblemChangeDto
Source§impl<'de> Deserialize<'de> for ProblemChangeDto
impl<'de> Deserialize<'de> for ProblemChangeDto
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
Source§impl PartialEq for ProblemChangeDto
impl PartialEq for ProblemChangeDto
Source§impl Serialize for ProblemChangeDto
impl Serialize for ProblemChangeDto
impl Eq for ProblemChangeDto
impl StructuralPartialEq for ProblemChangeDto
Auto Trait Implementations§
impl Freeze for ProblemChangeDto
impl RefUnwindSafe for ProblemChangeDto
impl Send for ProblemChangeDto
impl Sync for ProblemChangeDto
impl Unpin for ProblemChangeDto
impl UnwindSafe for ProblemChangeDto
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.