pub trait AttachmentStore {
// Required methods
fn put(&self, name: &str, bytes: &[u8]) -> Result<String, String>;
fn get(&self, key: &str) -> Result<Option<Vec<u8>>, String>;
fn remove(&self, key: &str) -> Result<(), String>;
}Expand description
Keeps the content of files, and gives a key for each. A record holds only that key, so reading a list does not read every file.
Required Methods§
Sourcefn put(&self, name: &str, bytes: &[u8]) -> Result<String, String>
fn put(&self, name: &str, bytes: &[u8]) -> Result<String, String>
Keeps a file, and says the key to find it by.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".