1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use id::Id; use myrmidon_types::{Command, TaskStatus}; use crate::Task; impl Task{ pub(crate) fn new(name: String, commands: Vec<Command>) -> Self{ Self { id: Id::generate(15), name, status: TaskStatus::Initialized, commands, } } }