pub struct UpdatePatch { /* private fields */ }Expand description
UpdatePatch
Public structural mutation patch builder.
Callers address fields by model field name and provide runtime Value
payloads; validation remains model-owned and occurs both at patch
construction and again during session mutation execution.
Implementations§
Source§impl UpdatePatch
impl UpdatePatch
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Build one empty structural patch.
Callers then append field updates through set_field(...) so model
field-name validation stays at the patch boundary.
Sourcepub fn set_field(
self,
model: &'static EntityModel,
field_name: &str,
value: Value,
) -> Result<Self, Error>
pub fn set_field( self, model: &'static EntityModel, field_name: &str, value: Value, ) -> Result<Self, Error>
Resolve one model field name and append its structural field update.
This keeps the public patch surface field-name-driven while still validating field existence before mutation execution begins.
Trait Implementations§
Source§impl Default for UpdatePatch
impl Default for UpdatePatch
Source§fn default() -> UpdatePatch
fn default() -> UpdatePatch
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UpdatePatch
impl RefUnwindSafe for UpdatePatch
impl Send for UpdatePatch
impl Sync for UpdatePatch
impl Unpin for UpdatePatch
impl UnsafeUnpin for UpdatePatch
impl UnwindSafe for UpdatePatch
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