some preliminary work on libraries
This commit is contained in:
parent
50abdf1783
commit
df944f980c
3 changed files with 60 additions and 7 deletions
|
@ -4,10 +4,13 @@ use cosmic::iced::Executor;
|
|||
use miette::{miette, Result};
|
||||
use sqlx::{Connection, SqliteConnection};
|
||||
|
||||
use super::kinds::ServiceItemKind;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Model<T> {
|
||||
pub items: Vec<T>,
|
||||
pub db: SqliteConnection,
|
||||
pub kind: ServiceItemKind,
|
||||
}
|
||||
impl<T> Model<T> {
|
||||
pub fn add_item(&mut self, item: T) -> Result<()> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue