This repository has been archived on 2026-04-25. You can view files and clone it, but cannot push or open issues or pull requests.
Tasky/src/board.rs
2024-06-23 14:52:31 -04:00

25 lines
No EOL
560 B
Rust
Executable file

// Libraries
use crate::card;
// Structures
pub struct TaskBoard {
pub name: String,
pub cards: Vec<card::TaskCard>
}
// Implementations
impl TaskBoard {
pub fn init(name: String) -> TaskBoard {
// Setting the name
let name: String = name;
// Init default cards
let mut cards: Vec<card::TaskCard> = Vec::new();
// Creating a new default card
cards.push(card::TaskCard::init(String::new(), String::new()));
// Return the board!
return TaskBoard {name: name, cards: cards};
}
}