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>>, ) -> DynamicScalarVariableSlot<S>
pub fn with_descriptor_index( self, descriptor_index: usize, ) -> DynamicScalarVariableSlot<S>
pub fn resolve_descriptor_index( &mut self, descriptor: &SolutionDescriptor, ) -> Result<(), String>
pub fn resolved_against( self, descriptor: &SolutionDescriptor, ) -> Result<DynamicScalarVariableSlot<S>, String>
pub fn is_descriptor_resolved(&self) -> bool
pub fn descriptor_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 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, ) -> DynamicScalarVariableSlot<S>
Trait Implementations§
Source§impl<S> Clone for DynamicScalarVariableSlot<S>
impl<S> Clone for DynamicScalarVariableSlot<S>
Source§fn clone(&self) -> DynamicScalarVariableSlot<S>
fn clone(&self) -> DynamicScalarVariableSlot<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S> Debug for DynamicScalarVariableSlot<S>
impl<S> Debug for DynamicScalarVariableSlot<S>
Source§impl<S> PartialEq for DynamicScalarVariableSlot<S>
impl<S> PartialEq for DynamicScalarVariableSlot<S>
Source§fn eq(&self, other: &DynamicScalarVariableSlot<S>) -> bool
fn eq(&self, other: &DynamicScalarVariableSlot<S>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<S> Eq for DynamicScalarVariableSlot<S>
Auto Trait Implementations§
impl<S> Freeze for DynamicScalarVariableSlot<S>
impl<S> !RefUnwindSafe 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>
impl<S> !UnwindSafe 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
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more