1 2 3 4 5 6 7 8 9 10 11 12 13
pub struct Task { prompt: String, } impl Task { pub fn new(prompt: impl Into<String>) -> Self { Self { prompt: prompt.into() } } pub fn prompt(&self) -> &str { &self.prompt } }