diff options
author | Luca Casonato <hello@lcas.dev> | 2023-12-05 14:21:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-05 21:21:46 +0800 |
commit | 74e39a927c63e789fec1c8f1817812920079229d (patch) | |
tree | fa38e32c700865b25710f491d551086733d58d5f /ext/kv/remote.rs | |
parent | a24d3e8763bc48b69936db9231efb76766914303 (diff) |
feat(unstable): kv.watch() (#21147)
This commit adds support for a new `kv.watch()` method that allows
watching for changes to a key-value pair. This is useful for cases
where you want to be notified when a key-value pair changes, but
don't want to have to poll for changes.
---------
Co-authored-by: losfair <zhy20000919@hotmail.com>
Diffstat (limited to 'ext/kv/remote.rs')
-rw-r--r-- | ext/kv/remote.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/kv/remote.rs b/ext/kv/remote.rs index 7cac6b9c3..855b091fa 100644 --- a/ext/kv/remote.rs +++ b/ext/kv/remote.rs @@ -66,6 +66,15 @@ pub struct PermissionChecker<P: RemoteDbHandlerPermissions> { _permissions: PhantomData<P>, } +impl<P: RemoteDbHandlerPermissions> Clone for PermissionChecker<P> { + fn clone(&self) -> Self { + Self { + state: self.state.clone(), + _permissions: PhantomData, + } + } +} + impl<P: RemoteDbHandlerPermissions + 'static> denokv_remote::RemotePermissions for PermissionChecker<P> { |