FieldMigration

Trait FieldMigration 

Source
pub trait FieldMigration {
    // Required method
    fn deprecated_fields(&self) -> Vec<DeprecatedField>;

    // Provided method
    fn migrate_fields(&self, value: &mut Value) -> Result<Vec<String>, String> { ... }
}
Expand description

Field migration trait for automatic field transformations

Required Methods§

Source

fn deprecated_fields(&self) -> Vec<DeprecatedField>

Get the deprecated field mappings

Provided Methods§

Source

fn migrate_fields(&self, value: &mut Value) -> Result<Vec<String>, String>

Apply field migrations to JSON value

Implementors§