pub enum CompiledTransform {
Flatten {
separator: String,
},
RenameKeys {
re: Regex,
replacement: String,
},
KeysCase {
mode: KeyCaseMode,
},
Select {
fields: Vec<String>,
},
Drop {
fields: Vec<String>,
},
Set {
values: Map<String, Value>,
},
RenameField {
fields: HashMap<String, String>,
},
Cast {
fields: HashMap<String, CastType>,
on_error: CastOnError,
},
Redact {
fields: Vec<String>,
mask: Value,
},
ValueCase {
fields: Vec<String>,
mode: ValueCaseMode,
},
SpellSymbols {
replacements: Vec<(String, String)>,
separator: String,
},
Custom(Arc<dyn Fn(Value) -> Value + Send + Sync>),
}Expand description
Pre-compiled form of a RecordTransform.
Stored inside a source (e.g. the REST source’s RestStream) so that regex
patterns are compiled exactly once (at construction time) rather than once
per record.
Variants§
Flatten
Available on crate feature
transform-flatten only.RenameKeys
Available on crate feature
transform-rename-keys only.KeysCase
Available on crate feature
transform-keys-case only.Fields
§
mode: KeyCaseModeSelect
Available on crate feature
transform-select only.Drop
Available on crate feature
transform-drop only.Set
Available on crate feature
transform-set only.RenameField
Available on crate feature
transform-rename-field only.Cast
Available on crate feature
transform-cast only.Redact
Available on crate feature
transform-redact only.ValueCase
Available on crate feature
transform-value-case only.SpellSymbols
Available on crate feature
transform-spell-symbols only.Fields
Custom(Arc<dyn Fn(Value) -> Value + Send + Sync>)
Trait Implementations§
Source§impl Clone for CompiledTransform
impl Clone for CompiledTransform
Source§fn clone(&self) -> CompiledTransform
fn clone(&self) -> CompiledTransform
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompiledTransform
impl !RefUnwindSafe for CompiledTransform
impl Send for CompiledTransform
impl Sync for CompiledTransform
impl Unpin for CompiledTransform
impl UnsafeUnpin for CompiledTransform
impl !UnwindSafe for CompiledTransform
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