pub struct WorkflowRandomStream { /* private fields */ }Expand description
A pseudo-random stream private to a stable caller-supplied name.
Obtain a stream with WorkflowContext::random_stream,
SyncWorkflowContext::random_stream, or
crate::workflow_interceptors::WorkflowInterceptorContext::random_stream. Looking up the
same name again continues the same stream, while different names and the context’s default
WorkflowContext::random stream do not consume one another. Clones of this value refer to the
same named stream.
Draws advance workflow state without recording individual values in history, so replaying code must draw from a given name in the same order. Adding or removing draws from one name does not change any other name.
Workflow reset replays the original sequence through the reset point. When Core supplies the reset run’s new randomness seed, all named streams start new sequences for work after that point. Continue-as-new creates a new workflow run and independently seeds all streams.
Implementations§
Trait Implementations§
Source§impl Clone for WorkflowRandomStream
impl Clone for WorkflowRandomStream
Source§fn clone(&self) -> WorkflowRandomStream
fn clone(&self) -> WorkflowRandomStream
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for WorkflowRandomStream
impl !Send for WorkflowRandomStream
impl !Sync for WorkflowRandomStream
impl !UnwindSafe for WorkflowRandomStream
impl Freeze for WorkflowRandomStream
impl Unpin for WorkflowRandomStream
impl UnsafeUnpin for WorkflowRandomStream
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request