pub struct Engine { /* private fields */ }Expand description
Executes runs of one graph.
Implementations§
Source§impl Engine
impl Engine
pub fn new(graph: Arc<Graph>) -> Self
Sourcepub fn fingerprint(&self) -> &str
pub fn fingerprint(&self) -> &str
The fingerprint a snapshot of this engine’s runs carries: the graph’s, and the linked graphs’ when there are any. Hosts compare a snapshot with this, not with the graph’s own fingerprint.
pub fn with_services(self, services: Services) -> Self
Share an existing services registry.
pub fn with_clock(self, clock: Arc<dyn Clock>) -> Self
pub fn with_limits(self, limits: Limits) -> Self
pub fn graph(&self) -> &Arc<Graph> ⓘ
pub fn limits(&self) -> &Limits
Sourcepub fn run(&self, input: RunInput) -> RunStream
pub fn run(&self, input: RunInput) -> RunStream
Start a run. The returned stream drives execution when polled (no task is
spawned), so it works on any executor. The final item is always a terminal
event (RunSucceeded, RunFailed, RunAborted or RunPaused).
Sourcepub async fn run_to_end(&self, input: RunInput) -> Event
pub async fn run_to_end(&self, input: RunInput) -> Event
Run to completion and return the terminal event, discarding the others.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Engine
impl !UnwindSafe for Engine
impl Forget for Engine
impl Freeze for Engine
impl Move for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnsafeUnpin for Enginewhere
*const ArcInner<Graph> is !null: UnsafeUnpin,
PhantomData<ArcInner<Graph>>: UnsafeUnpin,
*const ArcInner<Services> is !null: UnsafeUnpin,
PhantomData<ArcInner<Services>>: UnsafeUnpin,
*const ArcInner<dyn Clock> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Clock>>: UnsafeUnpin,
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