pub trait Bufferable {
type BufferType: Buffered;
// Required method
fn into_buffer(self, builder: &mut Builder<'_, '_, '_>) -> Self::BufferType;
// Provided methods
fn join<'w, 's, 'a, 'b>(
self,
builder: &'b mut Builder<'w, 's, 'a>,
) -> Chain<'w, 's, 'a, 'b, BufferItem<Self>>
where Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferItem<Self>: 'static + Send + Sync { ... }
fn listen<'w, 's, 'a, 'b>(
self,
builder: &'b mut Builder<'w, 's, 'a>,
) -> Chain<'w, 's, 'a, 'b, BufferKeys<Self>>
where Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync { ... }
fn on_cleanup<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)
where Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings> { ... }
fn on_cancel<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)
where Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings> { ... }
fn on_terminate<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)
where Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings> { ... }
fn on_cleanup_if<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
conditions: CleanupWorkflowConditions,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)
where Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings> { ... }
}
Required Associated Types§
type BufferType: Buffered
Required Methods§
Sourcefn into_buffer(self, builder: &mut Builder<'_, '_, '_>) -> Self::BufferType
fn into_buffer(self, builder: &mut Builder<'_, '_, '_>) -> Self::BufferType
Convert these bufferable workflow elements into buffers if they are not buffers already.
Provided Methods§
Sourcefn join<'w, 's, 'a, 'b>(
self,
builder: &'b mut Builder<'w, 's, 'a>,
) -> Chain<'w, 's, 'a, 'b, BufferItem<Self>>where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferItem<Self>: 'static + Send + Sync,
fn join<'w, 's, 'a, 'b>(
self,
builder: &'b mut Builder<'w, 's, 'a>,
) -> Chain<'w, 's, 'a, 'b, BufferItem<Self>>where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferItem<Self>: 'static + Send + Sync,
Join these bufferable workflow elements. Each time every buffer contains at least one element, this will pull the oldest element from each buffer and join them into a tuple that gets sent to the target.
If you need a more general way to get access to one or more buffers,
use listen
instead.
Sourcefn listen<'w, 's, 'a, 'b>(
self,
builder: &'b mut Builder<'w, 's, 'a>,
) -> Chain<'w, 's, 'a, 'b, BufferKeys<Self>>where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
fn listen<'w, 's, 'a, 'b>(
self,
builder: &'b mut Builder<'w, 's, 'a>,
) -> Chain<'w, 's, 'a, 'b, BufferKeys<Self>>where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Create an operation that will output buffer access keys each time any one of the buffers is modified. This can be used to create a node in a workflow that wakes up every time one or more buffers change, and then operates on those buffers.
For an operation that simply joins the contents of two or more outputs
or buffers, use join
instead.
Sourcefn on_cleanup<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings>,
fn on_cleanup<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings>,
Alternative way to call Builder::on_cleanup
.
Sourcefn on_cancel<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings>,
fn on_cancel<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings>,
Alternative way to call Builder::on_cancel
.
Sourcefn on_terminate<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings>,
fn on_terminate<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings>,
Alternative way to call Builder::on_terminate
.
Sourcefn on_cleanup_if<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
conditions: CleanupWorkflowConditions,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings>,
fn on_cleanup_if<Settings>(
self,
builder: &mut Builder<'_, '_, '_>,
conditions: CleanupWorkflowConditions,
build: impl FnOnce(Scope<BufferKeys<Self>, (), ()>, &mut Builder<'_, '_, '_>) -> Settings,
)where
Self: Sized,
Self::BufferType: 'static + Send + Sync,
BufferKeys<Self>: 'static + Send + Sync,
Settings: Into<ScopeSettings>,
Alternative way to call Builder::on_cleanup_if
.