pub struct PackSuggestor<P>where
P: Pack,{ /* private fields */ }Expand description
Wraps any Pack as a Converge Suggestor.
The adapter reads problem specifications from context (input_key),
runs the solver, and proposes the solution as a fact to output_key.
Implementations§
Source§impl<P> PackSuggestor<P>where
P: Pack,
impl<P> PackSuggestor<P>where
P: Pack,
Sourcepub fn new(
pack: P,
input_key: ContextKey,
output_key: ContextKey,
) -> PackSuggestor<P>
pub fn new( pack: P, input_key: ContextKey, output_key: ContextKey, ) -> PackSuggestor<P>
Create a new PackSuggestor wrapping the given pack.
Trait Implementations§
Source§impl<P> Suggestor for PackSuggestor<P>where
P: Pack,
impl<P> Suggestor for PackSuggestor<P>where
P: Pack,
Source§fn dependencies(&self) -> &[ContextKey]
fn dependencies(&self) -> &[ContextKey]
Context keys this suggestor reads from. Read more
Source§fn accepts(&self, ctx: &dyn Context) -> bool
fn accepts(&self, ctx: &dyn Context) -> bool
Pure predicate: should this suggestor execute given the current context? Read more
Auto Trait Implementations§
impl<P> Freeze for PackSuggestor<P>where
P: Freeze,
impl<P> RefUnwindSafe for PackSuggestor<P>where
P: RefUnwindSafe,
impl<P> Send for PackSuggestor<P>
impl<P> Sync for PackSuggestor<P>
impl<P> Unpin for PackSuggestor<P>where
P: Unpin,
impl<P> UnsafeUnpin for PackSuggestor<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for PackSuggestor<P>where
P: UnwindSafe,
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