Skip to main content

KeyedDocuments

Trait KeyedDocuments 

Source
pub trait KeyedDocuments: Send + Sync {
    // Required methods
    fn get(&self, key: &str) -> Result<Option<Value>, String>;
    fn set(&self, key: &str, value: &Value) -> Result<(), String>;
    fn list(&self, prefix: &str) -> Result<Vec<(String, Value)>, String>;
}
Expand description

Keyed durable documents (DurableDocumentStorage): listings keep insertion order.

Required Methods§

Source

fn get(&self, key: &str) -> Result<Option<Value>, String>

Source

fn set(&self, key: &str, value: &Value) -> Result<(), String>

Source

fn list(&self, prefix: &str) -> Result<Vec<(String, Value)>, String>

Every (key, value) whose key starts with prefix, in insertion order.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§