pub enum JsonRule {
RenameField {
from: String,
to: String,
},
RemoveField(String),
SetField {
path: String,
value: Value,
},
WrapIn(String),
Unwrap(String),
}Expand description
A rule for transforming a JSON structure.
Variants§
RenameField
Rename a top-level field.
RemoveField(String)
Remove a field by path (dot-separated).
SetField
Set a field to a constant value.
WrapIn(String)
Wrap the entire body inside a new object field.
Unwrap(String)
Unwrap: extract the value at a given path and use it as the new root.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JsonRule
impl RefUnwindSafe for JsonRule
impl Send for JsonRule
impl Sync for JsonRule
impl Unpin for JsonRule
impl UnsafeUnpin for JsonRule
impl UnwindSafe for JsonRule
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