Skip to main content

JoinNode

Struct JoinNode 

Source
pub struct JoinNode { /* private fields */ }
Expand description

Converges multiple branches, waiting for every predecessor.

Implementations§

Source§

impl JoinNode

Source

pub fn new(name: &str) -> Arc<JoinNode> ⓘ

A join node without an input schema.

Source

pub fn with_schema( name: &str, schema: Value, ) -> Result<Arc<JoinNode>, WorkflowError>

A JoinNode whose input is validated against schema.

Trait Implementations§

Source§

impl Node for JoinNode

Source§

fn validate_input(&self, input: Value) -> Result<Value, WorkflowError>

Validates each predecessor’s output individually against the input schema; a non-map input falls back to the default validation.

Source§

fn run(&self, ctx: Context, input: Value) -> EventStream

Yields the scheduler-aggregated predecessor map as its output.

Source§

fn name(&self) -> &str

The node’s name, unique within a workflow graph.
Source§

fn description(&self) -> &str

The node’s human-readable description.
Source§

fn config(&self) -> &NodeConfig

The node’s configuration.
Source§

fn input_schema(&self) -> Option<&Value>

None = no schema, no input validation.
Source§

fn output_schema(&self) -> Option<&Value>

None = no schema, no output validation.
Source§

fn validate_output(&self, v: Value) -> Result<Value, WorkflowError>

Called by the scheduler on every yielded event with an output.
Source§

fn as_any(&self) -> &dyn Any

Downcasting support, to tell concrete node types apart.
Source§

fn state_field_names(&self) -> Option<&[String]>

The names of the state fields the node binds as parameters; None = node does not bind state params.

Auto Trait Implementations§

§

impl !RefUnwindSafe for JoinNode

§

impl !UnwindSafe for JoinNode

§

impl Forget for JoinNode

§

impl Freeze for JoinNode
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const ArcInner<dyn Fn(&AgentError) -> bool + Sync + Send> is !null: Freeze, PhantomData<ArcInner<dyn Fn(&AgentError) -> bool + Sync + Send>>: Freeze, *const ArcInner<CompiledSchema> is !null: Freeze, PhantomData<ArcInner<CompiledSchema>>: Freeze,

§

impl Move for JoinNode

§

impl Send for JoinNode
where RawVecInner: Send, Arc<dyn Fn(&AgentError) -> bool + Sync + Send>: Send, Arc<CompiledSchema>: Send,

§

impl Sync for JoinNode
where RawVecInner: Sync, Arc<dyn Fn(&AgentError) -> bool + Sync + Send>: Sync, Arc<CompiledSchema>: Sync,

§

impl Unpin for JoinNode
where *const u8 is !null: Unpin, Arc<dyn Fn(&AgentError) -> bool + Sync + Send>: Unpin, Arc<CompiledSchema>: Unpin,

§

impl UnsafeUnpin for JoinNode
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const ArcInner<dyn Fn(&AgentError) -> bool + Sync + Send> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn Fn(&AgentError) -> bool + Sync + Send>>: UnsafeUnpin, *const ArcInner<CompiledSchema> is !null: UnsafeUnpin, PhantomData<ArcInner<CompiledSchema>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more