pub struct SubgraphMount<S: State> {
pub name: String,
pub config: SubgraphConfig,
pub node: Arc<dyn Node<S>>,
}Expand description
A mounted subgraph ready for execution as a node
Contains the compiled subgraph and configuration needed to execute it as a node within a parent graph.
Fields§
§name: StringName of the subgraph mount point
config: SubgraphConfigSubgraph configuration
node: Arc<dyn Node<S>>Type-erased subgraph node implementation
Implementations§
Source§impl<S: State> SubgraphMount<S>
impl<S: State> SubgraphMount<S>
Sourcepub fn new(
name: impl Into<String>,
config: SubgraphConfig,
node: Arc<dyn Node<S>>,
) -> Self
pub fn new( name: impl Into<String>, config: SubgraphConfig, node: Arc<dyn Node<S>>, ) -> Self
Create a new subgraph mount
Sourcepub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_name(self, name: impl Into<String>) -> Self
Set or change the subgraph mount name.
Consumes and returns Self for fluent chaining.
Sourcepub const fn with_config(self, config: SubgraphConfig) -> Self
pub const fn with_config(self, config: SubgraphConfig) -> Self
Replace the subgraph configuration.
Consumes and returns Self for fluent chaining.
Sourcepub const fn with_persistence(self, persistence: SubgraphPersistence) -> Self
pub const fn with_persistence(self, persistence: SubgraphPersistence) -> Self
Set the checkpoint persistence mode on the config.
Convenience builder that updates self.config.persistence
without replacing the entire SubgraphConfig.
Consumes and returns Self for fluent chaining.
Trait Implementations§
Auto Trait Implementations§
impl<S> !RefUnwindSafe for SubgraphMount<S>
impl<S> !UnwindSafe for SubgraphMount<S>
impl<S> Freeze for SubgraphMount<S>
impl<S> Send for SubgraphMount<S>
impl<S> Sync for SubgraphMount<S>
impl<S> Unpin for SubgraphMount<S>
impl<S> UnsafeUnpin for SubgraphMount<S>
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