running so far
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct Article {
|
||||
pub title: String,
|
||||
pub content: String,
|
||||
}
|
||||
|
||||
impl Article {
|
||||
pub fn new(title: &str, content: &str) -> Article {
|
||||
Article {
|
||||
title: title.to_string(),
|
||||
content: content.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user