Skip to main content

ParallelOperation

Enum ParallelOperation 

Source
pub enum ParallelOperation {
    Activity {
        activity_type: String,
        options: ActivityOptions,
        arguments: Result<AvroValue>,
    },
    ChildWorkflow {
        workflow_type: String,
        options: ChildWorkflowOptions,
        arguments: Result<AvroValue>,
    },
    Timer(Duration),
    Signal(String),
    Condition {
        options: ConditionWaitOptions,
        predicate: Box<dyn Fn() -> Result<bool> + Send + 'static>,
    },
    Group(Vec<ParallelOperation>),
}
Expand description

A deferred durable leaf or nested group for WorkflowContext::parallel.

Constructors capture arguments but perform no I/O. The join validates the complete tree, attaches the existing parallel-group metadata to every ordinary command, schedules all leaves, and then suspends.

Variants§

§

Activity

Fields

§activity_type: String
§arguments: Result<AvroValue>
§

ChildWorkflow

Fields

§workflow_type: String
§arguments: Result<AvroValue>
§

Timer(Duration)

§

Signal(String)

§

Condition

Fields

§predicate: Box<dyn Fn() -> Result<bool> + Send + 'static>
§

Group(Vec<ParallelOperation>)

Implementations§

Source§

impl ParallelOperation

Source

pub fn activity<T: Serialize>(activity_type: impl Into<String>, args: T) -> Self

Source

pub fn activity_with_options<T: Serialize>( activity_type: impl Into<String>, options: ActivityOptions, args: T, ) -> Self

Source

pub fn child_workflow<T: Serialize>( workflow_type: impl Into<String>, options: ChildWorkflowOptions, args: T, ) -> Self

Source

pub fn timer(duration: Duration) -> Self

Source

pub fn signal(signal_name: impl Into<String>) -> Self

Source

pub fn condition<F>(options: ConditionWaitOptions, predicate: F) -> Self
where F: Fn() -> Result<bool> + Send + 'static,

Source

pub fn group(operations: Vec<ParallelOperation>) -> Self

Auto Trait Implementations§

§

impl !RefUnwindSafe for ParallelOperation

§

impl !Sync for ParallelOperation

§

impl !UnwindSafe for ParallelOperation

§

impl Forget for ParallelOperation

§

impl Freeze for ParallelOperation
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<Duration>: Freeze, PhantomData<String>: Freeze, PhantomData<AvroValue>: Freeze, *const LeafNode<String, AvroValue> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, AvroValue)>>: Freeze, *const Inner is !null: Freeze, PhantomData<Inner>: Freeze, &'static str: Freeze, *const ErrorImpl is !null: Freeze, PhantomData<ErrorImpl>: Freeze, NonZero<u16>: Freeze, PhantomData<Value>: Freeze, *const LeafNode<String, Value> is !null: Freeze, PhantomData<Box<(String, Value)>>: Freeze, *const NexusOperationFailure is !null: Freeze, PhantomData<NexusOperationFailure>: Freeze, PhantomData<usize>: Freeze, PhantomData<ParallelGroupMetadata>: Freeze, PhantomData<ParallelCompletion>: Freeze, *const Error is !null: Freeze, PhantomData<Error>: Freeze, *const LeafNode<String, String> is !null: Freeze, PhantomData<Box<(String, String)>>: Freeze, NonZero<i32>: Freeze, Utc: Freeze, PhantomData<CancellationLineage>: Freeze, *const ScopedCancellationContext is !null: Freeze, PhantomData<ScopedCancellationContext>: Freeze, *const ArcInner<Mutex<WorkflowState>> is !null: Freeze, PhantomData<ScopedCancellationLineage>: Freeze, *const LeafNode<String, Vec<String>> is !null: Freeze, PhantomData<Box<(String, Vec<String>)>>: Freeze, *const ArcInner<FailureView> is !null: Freeze, PhantomData<ArcInner<FailureView>>: Freeze, PhantomData<u64>: Freeze, *const dyn Fn() -> Result<bool, Error> + Send is !null: Freeze, PhantomData<dyn Fn() -> Result<bool, Error> + Send>: Freeze, PhantomData<ParallelOperation>: Freeze,

§

impl Move for ParallelOperation

§

impl Send for ParallelOperation
where RawVecInner: Send, NodeRef<Owned, String, AvroValue, LeafOrInternal>: Send, BoxRaw<(String, AvroValue)>: Send, BoxRaw<Inner>: Send, &'static str: Send, BoxRaw<ErrorImpl>: Send, NonZero<u16>: Send, NodeRef<Owned, String, Value, LeafOrInternal>: Send, BoxRaw<(String, Value)>: Send, BoxRaw<NexusOperationFailure>: Send, BoxRaw<Error>: Send, NodeRef<Owned, String, String, LeafOrInternal>: Send, BoxRaw<(String, String)>: Send, NonZero<i32>: Send, Utc: Send, BoxRaw<ScopedCancellationContext>: Send, Weak<Mutex<WorkflowState>>: Send, NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Send, BoxRaw<(String, Vec<String>)>: Send, Arc<FailureView>: Send, BoxRaw<dyn Fn() -> Result<bool, Error> + Send>: Send,

§

impl Unpin for ParallelOperation
where *const u8 is !null: Unpin, *const LeafNode<String, AvroValue> is !null: Unpin, Box<(String, AvroValue)>: Unpin, Box<Inner>: Unpin, &'static str: Unpin, Box<ErrorImpl>: Unpin, NonZero<u16>: Unpin, *const LeafNode<String, Value> is !null: Unpin, Box<(String, Value)>: Unpin, Box<NexusOperationFailure>: Unpin, Box<Error>: Unpin, *const LeafNode<String, String> is !null: Unpin, Box<(String, String)>: Unpin, NonZero<i32>: Unpin, Utc: Unpin, Box<ScopedCancellationContext>: Unpin, *const ArcInner<Mutex<WorkflowState>> is !null: Unpin, *const LeafNode<String, Vec<String>> is !null: Unpin, Box<(String, Vec<String>)>: Unpin, Arc<FailureView>: Unpin, Box<dyn Fn() -> Result<bool, Error> + Send>: Unpin,

§

impl UnsafeUnpin for ParallelOperation
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<Duration>: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, PhantomData<AvroValue>: UnsafeUnpin, *const LeafNode<String, AvroValue> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(String, AvroValue)>>: UnsafeUnpin, *const Inner is !null: UnsafeUnpin, PhantomData<Inner>: UnsafeUnpin, &'static str: UnsafeUnpin, *const ErrorImpl is !null: UnsafeUnpin, PhantomData<ErrorImpl>: UnsafeUnpin, NonZeroU16Inner: UnsafeUnpin, PhantomData<Value>: UnsafeUnpin, *const LeafNode<String, Value> is !null: UnsafeUnpin, PhantomData<Box<(String, Value)>>: UnsafeUnpin, *const NexusOperationFailure is !null: UnsafeUnpin, PhantomData<NexusOperationFailure>: UnsafeUnpin, PhantomData<usize>: UnsafeUnpin, PhantomData<ParallelGroupMetadata>: UnsafeUnpin, PhantomData<ParallelCompletion>: UnsafeUnpin, *const Error is !null: UnsafeUnpin, PhantomData<Error>: UnsafeUnpin, *const LeafNode<String, String> is !null: UnsafeUnpin, PhantomData<Box<(String, String)>>: UnsafeUnpin, NonZeroI32Inner: UnsafeUnpin, Utc: UnsafeUnpin, PhantomData<CancellationLineage>: UnsafeUnpin, *const ScopedCancellationContext is !null: UnsafeUnpin, PhantomData<ScopedCancellationContext>: UnsafeUnpin, *const ArcInner<Mutex<WorkflowState>> is !null: UnsafeUnpin, PhantomData<ScopedCancellationLineage>: UnsafeUnpin, *const LeafNode<String, Vec<String>> is !null: UnsafeUnpin, PhantomData<Box<(String, Vec<String>)>>: UnsafeUnpin, *const ArcInner<FailureView> is !null: UnsafeUnpin, PhantomData<ArcInner<FailureView>>: UnsafeUnpin, PhantomData<u64>: UnsafeUnpin, *const dyn Fn() -> Result<bool, Error> + Send is !null: UnsafeUnpin, PhantomData<dyn Fn() -> Result<bool, Error> + Send>: UnsafeUnpin, PhantomData<ParallelOperation>: 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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