pub struct LazySolution<'a, TNode: Debug + Eq + Hash + 'a, TError> {
pub bounds: Bounds<TNode>,
pub next_to_search: Box<dyn Iterator<Item = Result<TNode, TError>> + 'a>,
}
Expand description
The results of the search so far. The search is complete if next_to_search
is empty.
Fields§
§bounds: Bounds<TNode>
The bounds of the search so far.
next_to_search: Box<dyn Iterator<Item = Result<TNode, TError>> + 'a>
The next nodes to search in a suggested order. Normally, you would only
consume the first node in this iterator and then call Search::notify
with the result. However, if you want to parallelize or speculate on
further nodes, you can consume more nodes from this iterator.
This will be empty when the bounds are as tight as possible, i.e. the search is complete.
Implementations§
Source§impl<'a, TNode: Debug + Eq + Hash + 'a, TError> LazySolution<'a, TNode, TError>
impl<'a, TNode: Debug + Eq + Hash + 'a, TError> LazySolution<'a, TNode, TError>
Sourcepub fn into_eager(self) -> Result<EagerSolution<TNode>, TError>
pub fn into_eager(self) -> Result<EagerSolution<TNode>, TError>
Convenience function to call EagerSolution::from
on this LazySolution
.
Auto Trait Implementations§
impl<'a, TNode, TError> Freeze for LazySolution<'a, TNode, TError>
impl<'a, TNode, TError> !RefUnwindSafe for LazySolution<'a, TNode, TError>
impl<'a, TNode, TError> !Send for LazySolution<'a, TNode, TError>
impl<'a, TNode, TError> !Sync for LazySolution<'a, TNode, TError>
impl<'a, TNode, TError> Unpin for LazySolution<'a, TNode, TError>where
TNode: Unpin,
impl<'a, TNode, TError> !UnwindSafe for LazySolution<'a, TNode, TError>
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