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
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 Engine
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