pub struct SubgraphMount<S>where
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> SubgraphMount<S>where
S: State,
impl<S> SubgraphMount<S>where
S: State,
Sourcepub fn new(
name: impl Into<String>,
config: SubgraphConfig,
node: Arc<dyn Node<S>>,
) -> SubgraphMount<S>
pub fn new( name: impl Into<String>, config: SubgraphConfig, node: Arc<dyn Node<S>>, ) -> SubgraphMount<S>
Create a new subgraph mount
Sourcepub fn with_name(self, name: impl Into<String>) -> SubgraphMount<S>
pub fn with_name(self, name: impl Into<String>) -> SubgraphMount<S>
Set or change the subgraph mount name.
Consumes and returns Self for fluent chaining.
Sourcepub const fn with_config(self, config: SubgraphConfig) -> SubgraphMount<S>
pub const fn with_config(self, config: SubgraphConfig) -> SubgraphMount<S>
Replace the subgraph configuration.
Consumes and returns Self for fluent chaining.
Sourcepub const fn with_persistence(
self,
persistence: SubgraphPersistence,
) -> SubgraphMount<S>
pub const fn with_persistence( self, persistence: SubgraphPersistence, ) -> SubgraphMount<S>
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