pub struct MutatorRegistry { /* private fields */ }Expand description
The server’s registry of named mutators (§4.2). One of the two registries (the client’s optimistic twin lives in the client engine); the wire only carries names, so sharing mutator code is a deployment choice, not a protocol mode.
Implementations§
Source§impl MutatorRegistry
impl MutatorRegistry
pub fn new() -> MutatorRegistry
Sourcepub fn register(
&mut self,
name: &str,
f: impl Fn(&mut dyn MutationSql, &Value) -> Result<(), MutationReject> + 'static,
)
pub fn register( &mut self, name: &str, f: impl Fn(&mut dyn MutationSql, &Value) -> Result<(), MutationReject> + 'static, )
Register f under name (replacing any previous registration).
Trait Implementations§
Source§impl Default for MutatorRegistry
impl Default for MutatorRegistry
Source§fn default() -> MutatorRegistry
fn default() -> MutatorRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MutatorRegistry
impl !RefUnwindSafe for MutatorRegistry
impl !Send for MutatorRegistry
impl !Sync for MutatorRegistry
impl Unpin for MutatorRegistry
impl UnsafeUnpin for MutatorRegistry
impl !UnwindSafe for MutatorRegistry
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