pub struct JsonPatchRef<'a> {
pub operations: Vec<PatchOperationRef<'a>>,
}Expand description
A JSON Patch document with zero-copy operations.
Fields§
§operations: Vec<PatchOperationRef<'a>>The operations in this patch.
Implementations§
Source§impl<'a> JsonPatchRef<'a>
impl<'a> JsonPatchRef<'a>
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create with pre-allocated capacity.
Sourcepub fn push(&mut self, op: PatchOperationRef<'a>)
pub fn push(&mut self, op: PatchOperationRef<'a>)
Add an operation to the patch.
Sourcepub fn iter(&self) -> impl Iterator<Item = &PatchOperationRef<'a>>
pub fn iter(&self) -> impl Iterator<Item = &PatchOperationRef<'a>>
Iterate over operations.
Sourcepub fn into_owned(self) -> JsonPatchRef<'static>
pub fn into_owned(self) -> JsonPatchRef<'static>
Convert to owned version.
Sourcepub fn to_json_patch(&self) -> JsonPatch
pub fn to_json_patch(&self) -> JsonPatch
Convert to the standard (allocating) JsonPatch format.
Trait Implementations§
Source§impl<'a> Clone for JsonPatchRef<'a>
impl<'a> Clone for JsonPatchRef<'a>
Source§fn clone(&self) -> JsonPatchRef<'a>
fn clone(&self) -> JsonPatchRef<'a>
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<'a> Debug for JsonPatchRef<'a>
impl<'a> Debug for JsonPatchRef<'a>
Source§impl<'a> Default for JsonPatchRef<'a>
impl<'a> Default for JsonPatchRef<'a>
Source§fn default() -> JsonPatchRef<'a>
fn default() -> JsonPatchRef<'a>
Returns the “default value” for a type. Read more
Source§impl<'a, 'b> IntoIterator for &'b JsonPatchRef<'a>
impl<'a, 'b> IntoIterator for &'b JsonPatchRef<'a>
Source§impl<'a> IntoIterator for JsonPatchRef<'a>
impl<'a> IntoIterator for JsonPatchRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for JsonPatchRef<'a>
impl<'a> RefUnwindSafe for JsonPatchRef<'a>
impl<'a> Send for JsonPatchRef<'a>
impl<'a> Sync for JsonPatchRef<'a>
impl<'a> Unpin for JsonPatchRef<'a>
impl<'a> UnwindSafe for JsonPatchRef<'a>
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