Document more things
This commit is contained in:
parent
5142b6604e
commit
f37b4aa81c
2 changed files with 14 additions and 4 deletions
|
|
@ -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>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue