pub trait DurableObjectStore:
Send
+ Sync
+ Clone
+ 'static {
// Required methods
fn put_if_absent(&self, key: &str, value: &[u8]) -> Result<(), String>;
fn get(&self, key: &str) -> Result<Option<Vec<u8>>, String>;
fn delete(&self, key: &str) -> Result<bool, String>;
fn list_prefix(&self, prefix: &str) -> Result<Vec<String>, String>;
fn compare_and_swap(
&self,
key: &str,
expected: Option<&[u8]>,
replacement: &[u8],
) -> Result<bool, String>;
}Required Methods§
fn put_if_absent(&self, key: &str, value: &[u8]) -> Result<(), String>
fn get(&self, key: &str) -> Result<Option<Vec<u8>>, String>
fn delete(&self, key: &str) -> Result<bool, String>
fn list_prefix(&self, prefix: &str) -> Result<Vec<String>, String>
fn compare_and_swap( &self, key: &str, expected: Option<&[u8]>, replacement: &[u8], ) -> Result<bool, String>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".