pub enum MergePath {
Single(String),
Segments(Vec<String>),
}Expand description
Path target for a UpdateOp::Merge operation. Accepts either a
single string (legacy / first-level field) or an array of literal
segments (nested path).
Path normalization rules applied by the engine:
- absent /
Single("")/Segments(vec![])→ root merge Single("foo")is equivalent toSegments(vec!["foo".into()])Segments(["a", "b", "c"])walks three literal keys, never interpreting dots specially.Segments(vec!["a.b".into()])is a single literal key named"a.b".
Variant ordering is load-bearing. #[serde(untagged)] tries
variants in declaration order — Single MUST come before
Segments so a JSON string deserializes into Single rather than
failing the array match first.
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MergePath
impl<'de> Deserialize<'de> for MergePath
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MergePath
Source§impl JsonSchema for MergePath
impl JsonSchema for MergePath
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for MergePath
Auto Trait Implementations§
impl Freeze for MergePath
impl RefUnwindSafe for MergePath
impl Send for MergePath
impl Sync for MergePath
impl Unpin for MergePath
impl UnsafeUnpin for MergePath
impl UnwindSafe for MergePath
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