pub struct FnNode<S, F, Fut>where
S: GraphState,
F: Fn(&S, &RunnableConfig) -> Fut + Send + Sync,
Fut: Future<Output = Result<NodeOutput>> + Send,{ /* private fields */ }Expand description
A node created from an async function.
Implementations§
Source§impl<S, F, Fut> FnNode<S, F, Fut>where
S: GraphState,
F: Fn(&S, &RunnableConfig) -> Fut + Send + Sync,
Fut: Future<Output = Result<NodeOutput>> + Send,
impl<S, F, Fut> FnNode<S, F, Fut>where
S: GraphState,
F: Fn(&S, &RunnableConfig) -> Fut + Send + Sync,
Fut: Future<Output = Result<NodeOutput>> + Send,
Trait Implementations§
Source§impl<S, F, Fut> Node<S> for FnNode<S, F, Fut>where
S: GraphState,
F: Fn(&S, &RunnableConfig) -> Fut + Send + Sync,
Fut: Future<Output = Result<NodeOutput>> + Send,
impl<S, F, Fut> Node<S> for FnNode<S, F, Fut>where
S: GraphState,
F: Fn(&S, &RunnableConfig) -> Fut + Send + Sync,
Fut: Future<Output = Result<NodeOutput>> + Send,
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 S,
config: &'life2 RunnableConfig,
) -> Pin<Box<dyn Future<Output = Result<NodeOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 S,
config: &'life2 RunnableConfig,
) -> Pin<Box<dyn Future<Output = Result<NodeOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute the node with the current state. Read more
Source§fn retry_policy(&self) -> RetryPolicy
fn retry_policy(&self) -> RetryPolicy
Check if this node should be retried on failure.
Auto Trait Implementations§
impl<S, F, Fut> Freeze for FnNode<S, F, Fut>
impl<S, F, Fut> RefUnwindSafe for FnNode<S, F, Fut>
impl<S, F, Fut> Send for FnNode<S, F, Fut>
impl<S, F, Fut> Sync for FnNode<S, F, Fut>
impl<S, F, Fut> Unpin for FnNode<S, F, Fut>
impl<S, F, Fut> UnsafeUnpin for FnNode<S, F, Fut>
impl<S, F, Fut> UnwindSafe for FnNode<S, F, Fut>
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