blob: c759b02d8b90ebd9c1d7063a15137f74509b0531 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
use serde::Serialize;
#[derive(Serialize)]
pub struct Problem {
id: i64,
title: String,
description: String,
}
impl Problem {
pub(super) fn new(id: i64, title: String, description: String) -> Self {
Self { id, title, description }
}
pub fn id(&self) -> i64 { self.id }
pub fn title(&self) -> &str { &self.title }
pub fn description(&self) -> &str { &self.description }
}
|