Skip to main content

NativeProcessFunction

Trait NativeProcessFunction 

Source
pub trait NativeProcessFunction:
    Send
    + Sync
    + 'static {
    // Required method
    fn invoke(
        &self,
        activations: &[ProcessActivation],
    ) -> Result<Vec<ProcessActivationResult>, DbError>;
}
Expand description

Trusted, synchronous native handler. A call contains at most one activation for each key. The handler may vectorize over distinct keys but must not make one key’s result depend on unrelated batch members or their order. Return one result per activation, including those producing zero rows. Errors discard the entire unaccepted call.

Required Methods§

Source

fn invoke( &self, activations: &[ProcessActivation], ) -> Result<Vec<ProcessActivationResult>, DbError>

Compute proposed outputs and mutations without external side effects.

§Errors

Return an error for an invalid input or a failed computation. The engine keeps the invocation unaccepted and replays from its last committed checkpoint when necessary.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§