Document more things

This commit is contained in:
Joscha 2022-12-15 11:17:09 +01:00
parent 5142b6604e
commit f37b4aa81c
2 changed files with 14 additions and 4 deletions

View file

@ -14,6 +14,13 @@ pub mod tokio;
use rusqlite::Connection;
/// An action that can be performed on a [`Connection`].
///
/// Both commands and queries are considered actions. Commands usually have a
/// return type of `()`, while queries return the result of the query.
///
/// Actions are usually passed to a vault which will then execute them and
/// return the result. The way in which this occurs depends on the vault.
pub trait Action {
type Result;
fn run(self, conn: &mut Connection) -> rusqlite::Result<Self::Result>;