pub enum MutationAssignment {
Set(MutationExpression),
Unset,
Unknown,
}Expand description
Field assignment that preserves null versus removal versus unknown.
Variants§
Set(MutationExpression)
Evaluate and assign a concrete value (including explicit null).
Unset
Explicitly remove the field when the model supports unset.
Unknown
Field is omitted / unknown in a partial patch input.
Implementations§
Source§impl MutationAssignment
impl MutationAssignment
Sourcepub fn set(expression: MutationExpression) -> Self
pub fn set(expression: MutationExpression) -> Self
Construct a set assignment.
Sourcepub fn rewrite_with(
&self,
bind_input_path: &dyn Fn(&[String], &ProjectionValueType) -> Result<ProjectionExpression, MutationProgramError>,
) -> Result<Option<ProjectionAssignment>, MutationProgramError>
pub fn rewrite_with( &self, bind_input_path: &dyn Fn(&[String], &ProjectionValueType) -> Result<ProjectionExpression, MutationProgramError>, ) -> Result<Option<ProjectionAssignment>, MutationProgramError>
Rewrite into a projection assignment. Unknown becomes omitted (caller filters).
§Errors
Propagates rewrite failures from nested expressions.
Trait Implementations§
Source§impl Clone for MutationAssignment
impl Clone for MutationAssignment
Source§fn clone(&self) -> MutationAssignment
fn clone(&self) -> MutationAssignment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MutationAssignment
impl Debug for MutationAssignment
impl Eq for MutationAssignment
Source§impl PartialEq for MutationAssignment
impl PartialEq for MutationAssignment
Source§impl Serialize for MutationAssignment
impl Serialize for MutationAssignment
impl StructuralPartialEq for MutationAssignment
Auto Trait Implementations§
impl Freeze for MutationAssignment
impl RefUnwindSafe for MutationAssignment
impl Send for MutationAssignment
impl Sync for MutationAssignment
impl Unpin for MutationAssignment
impl UnsafeUnpin for MutationAssignment
impl UnwindSafe for MutationAssignment
Blanket Implementations§
Source§impl<T> AggregateBuilder for T
impl<T> AggregateBuilder for T
fn aggregate<A: Aggregate>(self) -> AggregateRepository<Self, A>
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,
Source§impl<T> Queueable for T
impl<T> Queueable for T
Source§fn queued(self) -> QueuedRepository<Self, InMemoryLockManager>
fn queued(self) -> QueuedRepository<Self, InMemoryLockManager>
Wrap with the default async lock manager. Pair with
.aggregate::<T>() for per-aggregate serialization over the async
repository surface.Source§fn queued_with<L: LockManager>(
self,
lock_manager: L,
) -> QueuedRepository<Self, L>
fn queued_with<L: LockManager>( self, lock_manager: L, ) -> QueuedRepository<Self, L>
Wrap with a custom async lock manager.