pub trait Store: Send + Sync {
// Required methods
fn list(&self, page: &str) -> Result<Vec<Listed>>;
fn create(
&self,
page: &str,
anchor: Anchor,
first: Message,
) -> Result<String>;
fn reply(&self, id: &str, message: Message) -> Result<Option<String>>;
fn resolve(&self, id: &str) -> Result<Option<String>>;
fn attached(&self) -> Result<Vec<(String, Listed)>>;
fn heard(&self, paths: &[PathBuf]) -> Vec<String>;
}Expand description
Required Methods§
Sourcefn create(&self, page: &str, anchor: Anchor, first: Message) -> Result<String>
fn create(&self, page: &str, anchor: Anchor, first: Message) -> Result<String>
Starts a thread on page with its first message; answers its id.
Sourcefn reply(&self, id: &str, message: Message) -> Result<Option<String>>
fn reply(&self, id: &str, message: Message) -> Result<Option<String>>
Appends message to thread id: the page it is on, or None when
there is no such thread.
Sourcefn resolve(&self, id: &str) -> Result<Option<String>>
fn resolve(&self, id: &str) -> Result<Option<String>>
Resolves thread id — it is gone: the page it was on, or None when
there was no such thread.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".