pub struct ApplyPatchPayload {
pub patch: Patch,
pub expected_versions: Vec<FileVersion>,
pub dry_run: bool,
}Expand description
Typed payload for applying a structured patch.
Fields§
§patch: PatchPatch to apply.
expected_versions: Vec<FileVersion>Expected versions for files referenced by the patch.
dry_run: boolValidate without writing.
Implementations§
Source§impl ApplyPatchPayload
impl ApplyPatchPayload
Sourcepub fn into_effect(self) -> Result<EffectRequest, CodingError>
pub fn into_effect(self) -> Result<EffectRequest, CodingError>
Converts this payload into an EffectRequest.
§Errors
Returns CodingError::InvalidPayload if JSON serialization fails.
Sourcepub fn from_effect(request: &EffectRequest) -> Result<Self, CodingError>
pub fn from_effect(request: &EffectRequest) -> Result<Self, CodingError>
Decodes this payload from a matching EffectRequest.
§Errors
Returns CodingError if the kind or payload is invalid.
Trait Implementations§
Source§impl Clone for ApplyPatchPayload
impl Clone for ApplyPatchPayload
Source§impl Debug for ApplyPatchPayload
impl Debug for ApplyPatchPayload
Source§impl<'de> Deserialize<'de> for ApplyPatchPayload
impl<'de> Deserialize<'de> for ApplyPatchPayload
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 ApplyPatchPayload
Source§impl PartialEq for ApplyPatchPayload
impl PartialEq for ApplyPatchPayload
Source§impl Serialize for ApplyPatchPayload
impl Serialize for ApplyPatchPayload
impl StructuralPartialEq for ApplyPatchPayload
Auto Trait Implementations§
impl Freeze for ApplyPatchPayload
impl RefUnwindSafe for ApplyPatchPayload
impl Send for ApplyPatchPayload
impl Sync for ApplyPatchPayload
impl Unpin for ApplyPatchPayload
impl UnsafeUnpin for ApplyPatchPayload
impl UnwindSafe for ApplyPatchPayload
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.