pub struct JsonPatch {
pub operations: Vec<PatchOperation>,
}Expand description
A JSON Patch document (sequence of operations).
Fields§
§operations: Vec<PatchOperation>The operations in this patch.
Implementations§
Source§impl JsonPatch
impl JsonPatch
Sourcepub const fn from_operations(operations: Vec<PatchOperation>) -> Self
pub const fn from_operations(operations: Vec<PatchOperation>) -> Self
Create a patch from a vector of operations.
Sourcepub fn push(&mut self, op: PatchOperation)
pub fn push(&mut self, op: PatchOperation)
Add an operation to the patch.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JsonPatch
impl<'de> Deserialize<'de> for JsonPatch
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
Source§impl<'a> IntoIterator for &'a JsonPatch
impl<'a> IntoIterator for &'a JsonPatch
Source§impl IntoIterator for JsonPatch
impl IntoIterator for JsonPatch
impl Eq for JsonPatch
impl StructuralPartialEq for JsonPatch
Auto Trait Implementations§
impl Freeze for JsonPatch
impl RefUnwindSafe for JsonPatch
impl Send for JsonPatch
impl Sync for JsonPatch
impl Unpin for JsonPatch
impl UnwindSafe for JsonPatch
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