pub trait ValueSelector<S: PlanningSolution, V>: Send + Debug {
// Required methods
fn iter_typed<'a, D: Director<S>>(
&'a self,
score_director: &'a D,
descriptor_index: usize,
entity_index: usize,
) -> impl Iterator<Item = V> + 'a;
fn size<D: Director<S>>(
&self,
score_director: &D,
descriptor_index: usize,
entity_index: usize,
) -> usize;
// Provided method
fn is_never_ending(&self) -> bool { ... }
}Expand description
A value selector that yields values of type V directly.
Unlike ValueSelector which returns Arc<dyn Any>, this trait
returns V inline, eliminating heap allocation per value.
§Type Parameters
S- The planning solution typeV- The value type
Required Methods§
fn iter_typed<'a, D: Director<S>>( &'a self, score_director: &'a D, descriptor_index: usize, entity_index: usize, ) -> impl Iterator<Item = V> + 'a
fn size<D: Director<S>>( &self, score_director: &D, descriptor_index: usize, entity_index: usize, ) -> usize
Provided Methods§
fn is_never_ending(&self) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.