pub struct Mutator<C> {
pub name: String,
/* private fields */
}Expand description
A mutator the client can run and replay by name (defineMutator in
packages/zql/src/mutate/mutator.ts). The name must match the TS
registry entry the API server runs.
The body runs synchronously: once optimistically, and again on every
rebase over new server data while the mutation is pending, so it must
only depend on the transaction, the arguments, and the context. It
returns what the caller’s client outcome carries.
Fields§
§name: StringThe name the server runs it by: its path in the TS mutator registry.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<C> !RefUnwindSafe for Mutator<C>
impl<C> !Send for Mutator<C>
impl<C> !Sync for Mutator<C>
impl<C> !UnwindSafe for Mutator<C>
impl<C> Forget for Mutator<C>
impl<C> Freeze for Mutator<C>
impl<C> Move for Mutator<C>
impl<C> Unpin for Mutator<C>
impl<C> UnsafeUnpin for Mutator<C>
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