pub struct DynamicScalarVariableSlot<S> {
pub entity: EntityClassId,
pub variable: VariableId,
pub entity_type_name: &'static str,
pub variable_name: &'static str,
pub allows_unassigned: bool,
/* private fields */
}Expand description
Public dynamic scalar variable slot.
Fields§
§entity: EntityClassId§variable: VariableId§entity_type_name: &'static str§variable_name: &'static str§allows_unassigned: boolImplementations§
Source§impl<S> DynamicScalarVariableSlot<S>
impl<S> DynamicScalarVariableSlot<S>
pub fn with_access( entity: EntityClassId, variable: VariableId, entity_type_name: &'static str, variable_name: &'static str, allows_unassigned: bool, access: Arc<dyn DynamicScalarAccess<S>>, ) -> Self
pub fn resolve_descriptor_index( &mut self, descriptor: &SolutionDescriptor, ) -> Result<(), String>
pub fn resolved_against( self, descriptor: &SolutionDescriptor, ) -> Result<Self, String>
pub fn is_descriptor_resolved(&self) -> bool
pub fn descriptor_index(&self) -> usize
pub fn descriptor_variable_index(&self) -> usize
pub fn matches_target( &self, entity_class: Option<&str>, variable_name: Option<&str>, ) -> bool
pub fn entity_count(&self, solution: &S) -> usize
pub fn current_value(&self, solution: &S, row: usize) -> Option<usize>
pub fn set_value(&self, solution: &mut S, row: usize, value: Option<usize>)
pub fn candidate_values<'a>(&self, solution: &'a S, row: usize) -> &'a [usize]
pub fn has_nearby_value_candidates(&self) -> bool
pub fn visit_nearby_value_candidates( &self, solution: &S, row: usize, limit: usize, visit: &mut dyn FnMut(usize), ) -> bool
pub fn nearby_value_distance( &self, solution: &S, row: usize, candidate: usize, ) -> Option<f64>
pub fn has_nearby_entity_candidates(&self) -> bool
pub fn visit_nearby_entity_candidates( &self, solution: &S, left_row: usize, limit: usize, visit: &mut dyn FnMut(usize), ) -> bool
pub fn nearby_entity_distance( &self, solution: &S, left_row: usize, right_row: usize, ) -> Option<f64>
pub fn value_is_legal( &self, solution: &S, row: usize, value: Option<usize>, ) -> bool
Source§impl<S> DynamicScalarVariableSlot<S>where
S: DynamicModelBackend,
impl<S> DynamicScalarVariableSlot<S>where
S: DynamicModelBackend,
pub fn new( entity: EntityClassId, variable: VariableId, entity_type_name: &'static str, variable_name: &'static str, allows_unassigned: bool, ) -> Self
Trait Implementations§
Source§impl<S> Clone for DynamicScalarVariableSlot<S>
impl<S> Clone for DynamicScalarVariableSlot<S>
Source§impl<S> Debug for DynamicScalarVariableSlot<S>
impl<S> Debug for DynamicScalarVariableSlot<S>
impl<S> Eq for DynamicScalarVariableSlot<S>
Auto Trait Implementations§
impl<S> !RefUnwindSafe for DynamicScalarVariableSlot<S>
impl<S> !UnwindSafe for DynamicScalarVariableSlot<S>
impl<S> Freeze for DynamicScalarVariableSlot<S>
impl<S> Send for DynamicScalarVariableSlot<S>
impl<S> Sync for DynamicScalarVariableSlot<S>
impl<S> Unpin for DynamicScalarVariableSlot<S>
impl<S> UnsafeUnpin for DynamicScalarVariableSlot<S>
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