pub struct BasicContext<S> {
pub get_variable: fn(&S, usize) -> Option<usize>,
pub set_variable: fn(&mut S, usize, Option<usize>),
pub values: Vec<usize>,
pub descriptor_index: usize,
pub variable_field: &'static str,
}Expand description
Function-pointer context for basic (non-list) variable solvers.
Carries all domain callbacks needed to construct move selectors
without requiring dyn or closures.
Fields§
§get_variable: fn(&S, usize) -> Option<usize>Gets the planning variable for entity i.
set_variable: fn(&mut S, usize, Option<usize>)Sets the planning variable for entity i.
values: Vec<usize>All valid values for the variable.
descriptor_index: usizeDescriptor index for the entity collection.
variable_field: &'static strVariable field name.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for BasicContext<S>
impl<S> RefUnwindSafe for BasicContext<S>
impl<S> Send for BasicContext<S>
impl<S> Sync for BasicContext<S>
impl<S> Unpin for BasicContext<S>
impl<S> UnsafeUnpin for BasicContext<S>
impl<S> UnwindSafe for BasicContext<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> 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