pub struct ExecutorGraphBuilder<'e> { /* private fields */ }Expand description
Borrowed wrapper that finalises a GraphBuilder
into a registered task.
Implementations§
Source§impl ExecutorGraphBuilder<'_>
impl ExecutorGraphBuilder<'_>
Sourcepub fn vertex<I: ExecutableItem>(&mut self, item: I) -> Vertex
pub fn vertex<I: ExecutableItem>(&mut self, item: I) -> Vertex
Add a vertex to the graph; returns its handle.
Sourcepub fn edge(&mut self, from: Vertex, to: Vertex) -> &mut Self
pub fn edge(&mut self, from: Vertex, to: Vertex) -> &mut Self
Add a directed edge from one vertex to another.
Sourcepub const fn root(&mut self, v: Vertex) -> &mut Self
pub const fn root(&mut self, v: Vertex) -> &mut Self
Designate the root vertex (its triggers gate the graph).
Sourcepub fn id(&mut self, id: impl Into<TaskId>) -> &mut Self
pub fn id(&mut self, id: impl Into<TaskId>) -> &mut Self
Override the auto-generated id with a custom one.
Sourcepub fn build(self) -> Result<TaskId, ExecutorError>
pub fn build(self) -> Result<TaskId, ExecutorError>
Validate and register the graph. Returns the task id.
The root vertex’s ExecutableItem::task_id override takes precedence
over any id set via ExecutorGraphBuilder::id, which itself takes
precedence over the auto-generated id.
Auto Trait Implementations§
impl<'e> Freeze for ExecutorGraphBuilder<'e>
impl<'e> !RefUnwindSafe for ExecutorGraphBuilder<'e>
impl<'e> Send for ExecutorGraphBuilder<'e>
impl<'e> !Sync for ExecutorGraphBuilder<'e>
impl<'e> Unpin for ExecutorGraphBuilder<'e>
impl<'e> UnsafeUnpin for ExecutorGraphBuilder<'e>
impl<'e> !UnwindSafe for ExecutorGraphBuilder<'e>
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