pub struct GraphPartition {
pub worker_id: String,
pub nodes: Vec<String>,
pub external_inputs: HashMap<String, String>,
pub external_outputs: Vec<String>,
pub subgraph: Option<ComputationGraph>,
}Expand description
Graph partition for a single worker
Fields§
§worker_id: StringWorker ID that will execute this partition
nodes: Vec<String>Nodes assigned to this worker
external_inputs: HashMap<String, String>Input dependencies from other partitions
external_outputs: Vec<String>Output nodes consumed by other partitions
subgraph: Option<ComputationGraph>Subgraph for this partition
Implementations§
Source§impl GraphPartition
impl GraphPartition
Sourcepub fn add_external_input(&mut self, node_id: String, source_worker_id: String)
pub fn add_external_input(&mut self, node_id: String, source_worker_id: String)
Add an external input dependency
Sourcepub fn mark_external_output(&mut self, node_id: String)
pub fn mark_external_output(&mut self, node_id: String)
Mark a node as an external output
Trait Implementations§
Source§impl Clone for GraphPartition
impl Clone for GraphPartition
Source§fn clone(&self) -> GraphPartition
fn clone(&self) -> GraphPartition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphPartition
impl Debug for GraphPartition
Source§impl<'de> Deserialize<'de> for GraphPartition
impl<'de> Deserialize<'de> for GraphPartition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GraphPartition
impl RefUnwindSafe for GraphPartition
impl Send for GraphPartition
impl Sync for GraphPartition
impl Unpin for GraphPartition
impl UnwindSafe for GraphPartition
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
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