pub struct ScalarAssignmentBinding<S> {
pub target: ScalarGroupMemberBinding<S>,
pub required_entity: Option<fn(&S, usize) -> bool>,
pub capacity_key: Option<fn(&S, usize, usize) -> Option<usize>>,
pub position_key: Option<fn(&S, usize) -> i64>,
pub sequence_key: Option<fn(&S, usize, usize) -> Option<usize>>,
pub entity_order: Option<fn(&S, usize) -> i64>,
pub value_order: Option<fn(&S, usize, usize) -> i64>,
}Fields§
§target: ScalarGroupMemberBinding<S>§required_entity: Option<fn(&S, usize) -> bool>§capacity_key: Option<fn(&S, usize, usize) -> Option<usize>>§position_key: Option<fn(&S, usize) -> i64>§sequence_key: Option<fn(&S, usize, usize) -> Option<usize>>§entity_order: Option<fn(&S, usize) -> i64>§value_order: Option<fn(&S, usize, usize) -> i64>Implementations§
Source§impl<S> ScalarAssignmentBinding<S>
impl<S> ScalarAssignmentBinding<S>
pub fn entity_count(&self, solution: &S) -> usize
pub fn current_value(&self, solution: &S, entity_index: usize) -> Option<usize>
pub fn is_required(&self, solution: &S, entity_index: usize) -> bool
pub fn capacity_key( &self, solution: &S, entity_index: usize, value: usize, ) -> Option<usize>
pub fn position_key(&self, solution: &S, entity_index: usize) -> Option<i64>
pub fn sequence_key( &self, solution: &S, entity_index: usize, value: usize, ) -> Option<usize>
pub fn entity_order_key(&self, solution: &S, entity_index: usize) -> Option<i64>
pub fn value_order_key( &self, solution: &S, entity_index: usize, value: usize, ) -> Option<i64>
pub fn candidate_values( &self, solution: &S, entity_index: usize, value_candidate_limit: Option<usize>, ) -> Vec<usize>
pub fn value_is_legal( &self, solution: &S, entity_index: usize, value: Option<usize>, ) -> bool
pub fn edit(&self, entity_index: usize, value: Option<usize>) -> ScalarEdit<S>
Trait Implementations§
Source§impl<S> Clone for ScalarAssignmentBinding<S>
impl<S> Clone for ScalarAssignmentBinding<S>
impl<S> Copy for ScalarAssignmentBinding<S>
Auto Trait Implementations§
impl<S> Freeze for ScalarAssignmentBinding<S>
impl<S> RefUnwindSafe for ScalarAssignmentBinding<S>
impl<S> Send for ScalarAssignmentBinding<S>
impl<S> Sync for ScalarAssignmentBinding<S>
impl<S> Unpin for ScalarAssignmentBinding<S>
impl<S> UnsafeUnpin for ScalarAssignmentBinding<S>
impl<S> UnwindSafe for ScalarAssignmentBinding<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<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