1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: MIT
3
4use crate::mvc;
5
6pub trait TaskRepository {
7 fn task_count(&self) -> usize;
8 fn get_task(&self, index: usize) -> Option<mvc::TaskModel>;
9 fn toggle_done(&self, index: usize) -> bool;
10 fn remove_task(&self, index: usize) -> bool;
11 fn push_task(&self, task: mvc::TaskModel) -> bool;
12}
13