blob: 15d943665dcdce2cf48741beaf97b0b96271f307 [file]
use crate::state::command::EntryCommand;
use crate::state::entry::StateEntry;
use async_trait::async_trait;
use iggy::error::IggyError;
use std::fmt::Debug;
pub mod command;
pub mod entry;
pub mod file;
pub mod models;
pub mod system;
pub trait State: Debug {
async fn init(&self) -> Result<Vec<StateEntry>, IggyError>;
async fn load_entries(&self) -> Result<Vec<StateEntry>, IggyError>;
async fn apply(&self, user_id: u32, command: EntryCommand) -> Result<(), IggyError>;
}