Skip to main content

sofie_db/
factory.rs

1use sofie_core::Result;
2
3use crate::Input;
4
5pub trait Create: Sized {
6    type Input: Input;
7    type Owner;
8
9    fn create(input: Self::Input, owner: Self::Owner) -> Result<Self>;
10}
11
12pub trait Update {
13    type Input: Input;
14
15    fn update(&mut self, changes: Self::Input) -> Result<()>;
16}