pub struct PatchDocument {
pub op: PatchOperation,
pub path: String,
pub value: Option<Value>,
}
Expand description
A JSONPatch document as defined by RFC 6902. The patch operation is subset of what is supported by RFC 6902.
Fields§
§op: PatchOperation
§path: String
It is JSON pointer indicating a field to be updated
value: Option<Value>
It is the value to be used for the field as indicated by op and path
Implementations§
Source§impl PatchDocument
impl PatchDocument
pub fn new(op: PatchOperation, path: String) -> PatchDocument
Trait Implementations§
Source§impl Clone for PatchDocument
impl Clone for PatchDocument
Source§fn clone(&self) -> PatchDocument
fn clone(&self) -> PatchDocument
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PatchDocument
impl Debug for PatchDocument
Source§impl<'de> Deserialize<'de> for PatchDocument
impl<'de> Deserialize<'de> for PatchDocument
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 FromIterator<PatchDocument> for UpdateRegistryRequest
impl FromIterator<PatchDocument> for UpdateRegistryRequest
Source§fn from_iter<U: IntoIterator<Item = PatchDocument>>(u: U) -> Self
fn from_iter<U: IntoIterator<Item = PatchDocument>>(u: U) -> Self
Creates a value from an iterator. Read more
Source§impl PartialEq for PatchDocument
impl PartialEq for PatchDocument
Source§impl Serialize for PatchDocument
impl Serialize for PatchDocument
impl StructuralPartialEq for PatchDocument
Auto Trait Implementations§
impl Freeze for PatchDocument
impl RefUnwindSafe for PatchDocument
impl Send for PatchDocument
impl Sync for PatchDocument
impl Unpin for PatchDocument
impl UnwindSafe for PatchDocument
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