Skip to main content

SynchronousTransformBuilder

Trait SynchronousTransformBuilder 

Source
pub trait SynchronousTransformBuilder: MemoryBounds {
    // Required method
    fn build<'life0, 'async_trait>(
        &'life0 self,
        context: ComponentContext,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn SynchronousTransform + Send>, GenericError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A synchronous transform builder.

Synchronous transforms are a special case of transforms that are executed synchronously, meaning that they don’t run as their own task. This is used for certain transforms, typically those where it’s more efficient to run multiple transformation steps in a single task.

Required Methods§

Source

fn build<'life0, 'async_trait>( &'life0 self, context: ComponentContext, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn SynchronousTransform + Send>, GenericError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Builds an instance of the synchronous transform.

The provided context is relative to the parent component that’s building this synchronous transform.

§Errors

If the synchronous transform can’t be built for any reason, an error is returned.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§