Skip to main content

MoveCursorSource

Trait MoveCursorSource 

Source
pub trait MoveCursorSource<S, M>
where S: PlanningSolution, M: Move<S>,
{ type Resources: Send; type Cursor<'a>: ResourceMoveCursor<S, M, Self::Resources> where Self: 'a; // Required method fn open_cursor<'a, D: Director<S>>( &'a mut self, resources: &mut Self::Resources, score_director: &D, context: MoveStreamContext, ) -> Self::Cursor<'a>; }
Expand description

Opens the next phase cursor from mutable solve-owned execution state.

Implementations must return a cursor that owns all candidate work. A source may lend state only while opening that cursor and must regain it when the cursor drops, which lets pause/resume and subsequent steps retain the exact seeded stream progression.

Required Associated Types§

Source

type Resources: Send

Mutable solve-owned data lent at cursor-open and reachable-pull boundaries. Ordinary stock selectors use (). Compiled runtime sources receive the runner’s one provider registry/reason arena here, so VND can retain many neighborhood states without cloning or storing a mutable resource in any one of them.

Source

type Cursor<'a>: ResourceMoveCursor<S, M, Self::Resources> where Self: 'a

The cursor has no mutable resource field. The shared phase loop lends Resources only for each candidate pull through [ResourceMoveCursor::next_candidate_with_resources].

Required Methods§

Source

fn open_cursor<'a, D: Director<S>>( &'a mut self, resources: &mut Self::Resources, score_director: &D, context: MoveStreamContext, ) -> Self::Cursor<'a>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§