Skip to main content

DoStorage

Trait DoStorage 

Source
pub trait DoStorage: Send + Sync {
    // Required methods
    fn get_bytes(&self, key: &str) -> Option<Vec<u8>>;
    fn put_bytes(&self, key: &str, value: &[u8]);
    fn delete(&self, key: &str);
}
Expand description

Abstraction over DO storage.put()/get() so the scaffold can express the persistence pattern without depending on the worker crate.

Required Methods§

Source

fn get_bytes(&self, key: &str) -> Option<Vec<u8>>

Source

fn put_bytes(&self, key: &str, value: &[u8])

Source

fn delete(&self, key: &str)

Implementors§