pub struct JsStep { /* private fields */ }Expand description
A JavaScript transform step powered by QuickJS (via rquickjs).
The user provides a JS function body that receives a row object and returns
a transformed object (or null/undefined to filter the record out).
{
"type": "js",
"function": "function transform(row) { return { ...row, total: row.price * row.qty } }"
}The function is compiled once at parse time. Each apply() call serializes
the row to JS, invokes the function, and deserializes the result back.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JsStep
impl RefUnwindSafe for JsStep
impl Send for JsStep
impl Sync for JsStep
impl Unpin for JsStep
impl UnsafeUnpin for JsStep
impl UnwindSafe for JsStep
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more