pub struct ModuleDagDefinition {
pub nodes: Vec<ModuleDagNodeDef>,
pub edges: Vec<ModuleDagEdgeDef>,
pub entry_nodes: Vec<String>,
pub default_policy: Option<DagNodeExecutionPolicy>,
pub metadata: HashMap<String, String>,
}Fields§
§nodes: Vec<ModuleDagNodeDef>§edges: Vec<ModuleDagEdgeDef>§entry_nodes: Vec<String>§default_policy: Option<DagNodeExecutionPolicy>§metadata: HashMap<String, String>Implementations§
Source§impl ModuleDagDefinition
impl ModuleDagDefinition
Sourcepub fn builder() -> ModuleDagBuilder
pub fn builder() -> ModuleDagBuilder
Returns a fluent builder.
ⓘ
let dag = ModuleDagDefinition::builder()
.edge(&login_node, &cate_list_node)
.edge(&cate_list_node, &brand_rank_downloader)
.edge(&cate_list_node, &goods_cate_downloader)
.edge(&brand_rank_downloader, &download_url_node)
.edge(&goods_cate_downloader, &download_url_node)
.edge(&download_url_node, &download_file_node)
.build();Nodes are collected automatically from edges in first-seen order.
Entry nodes (those with no incoming edges) are derived automatically.
Isolated nodes (no edges at all) can be added with .node().
pub fn from_linear_steps(steps: Vec<Arc<dyn ModuleNodeTrait>>) -> Self
Trait Implementations§
Source§impl Clone for ModuleDagDefinition
impl Clone for ModuleDagDefinition
Source§fn clone(&self) -> ModuleDagDefinition
fn clone(&self) -> ModuleDagDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ModuleDagDefinition
impl Default for ModuleDagDefinition
Source§fn default() -> ModuleDagDefinition
fn default() -> ModuleDagDefinition
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleDagDefinition
impl !UnwindSafe for ModuleDagDefinition
impl Freeze for ModuleDagDefinition
impl Send for ModuleDagDefinition
impl Sync for ModuleDagDefinition
impl Unpin for ModuleDagDefinition
impl UnsafeUnpin for ModuleDagDefinition
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more