pub struct MutateTransform { /* private fields */ }Expand description
Performs structural changes to an envelope without a scripting runtime.
Operations are applied in order. Each operation targets a dotted path
inside the envelope payload (e.g. payload.user.id). The root payload
is implicit — paths are relative to the payload object.
Supported operations:
add_field— insert or overwrite a field. Creates intermediate objects as needed.remove_field— delete a field. In strict mode the field must exist.rename_field— move a value from one path to another. In strict mode the source must exist.cast— convert a scalar value to another JSON type (string,int,float,bool,json).
§Missing-field handling
on_missing controls behavior when an operation references a path that
does not exist:
strict(default) — the transform returns an error, which is handled by the configuredErrorPolicy.lenient— the operation is silently skipped.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MutateTransform
impl RefUnwindSafe for MutateTransform
impl Send for MutateTransform
impl Sync for MutateTransform
impl Unpin for MutateTransform
impl UnsafeUnpin for MutateTransform
impl UnwindSafe for MutateTransform
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> 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