Skip to main content

StreamTransformer

Trait StreamTransformer 

Source
pub trait StreamTransformer:
    Send
    + Sync
    + 'static {
    // Required method
    fn transform(&self, data: Value) -> Option<Value>;
}
Expand description

Transformer for stream data

Required Methods§

Source

fn transform(&self, data: Value) -> Option<Value>

Transform the data.

Returns Some(value) with the transformed result, or None if the data was buffered and should not be emitted yet (e.g. when using BatchTransformer which accumulates to a threshold).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§