Skip to main content

Transform

Trait Transform 

Source
pub trait Transform: Send + Sync {
    // Required method
    fn apply(
        &self,
        chunk: StreamingDataChunk,
    ) -> Result<StreamingDataChunk, DatasetsError>;
}
Expand description

A stateless (or internally-mutable) operation on a StreamingDataChunk.

Implementing types must be Send + Sync so that pipelines can be safely moved across threads.

Required Methods§

Source

fn apply( &self, chunk: StreamingDataChunk, ) -> Result<StreamingDataChunk, DatasetsError>

Apply the transformation to chunk, returning a (potentially new) chunk. Implementations may mutate in place and return the same chunk, or allocate a new one.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§