#[non_exhaustive]pub enum CompiledTransform {
Show 19 variants
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: Vec<(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,
},
Hash {
fields: Vec<String>,
algorithm: HashAlgorithm,
encoding: HashEncoding,
salt: Option<String>,
into: Option<String>,
},
JsonParse {
fields: Vec<String>,
on_error: JsonParseOnError,
into: Option<String>,
},
Coalesce {
field: String,
default: Option<Value>,
from: Vec<String>,
treat_empty_string_as_null: bool,
},
Split {
field: String,
delimiter: String,
trim: bool,
into: Option<String>,
},
Join {
field: String,
delimiter: String,
into: Option<String>,
},
JsonEncode {
fields: Vec<String>,
},
Lookup {
index: HashMap<String, Map<String, Value>>,
on_record: String,
add: Vec<(String, String)>,
on_missing: LookupOnMissing,
},
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.
Non-exhaustive for the same reason as RecordTransform: new transforms
are added additively.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future 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.Fields
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
Hash
Available on crate feature
transform-hash only.JsonParse
Available on crate feature
transform-json-parse only.Coalesce
Available on crate feature
transform-coalesce only.Split
Available on crate feature
transform-split-join only.Join
Available on crate feature
transform-split-join only.JsonEncode
Available on crate feature
transform-json-encode only.Lookup
Available on crate feature
transform-lookup only.Fields
§
index: HashMap<String, Map<String, Value>>Reference rows indexed by the scalar-string form of on_ref
(first row wins on duplicate keys).
§
on_missing: LookupOnMissingCustom(Arc<dyn Fn(Value) -> Value + Send + Sync>)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CompiledTransform
impl !UnwindSafe for CompiledTransform
impl Freeze for CompiledTransform
impl Send for CompiledTransform
impl Sync for CompiledTransform
impl Unpin for CompiledTransform
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request