Add a method for fetching blog post contents
This commit is contained in:
parent
c2e1f27302
commit
c88e85f5ff
1 changed files with 4 additions and 0 deletions
|
@ -14,6 +14,10 @@ impl Post {
|
||||||
pub fn add_text(&mut self, text: &str) {
|
pub fn add_text(&mut self, text: &str) {
|
||||||
self.content.push_str(text);
|
self.content.push_str(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn content(&self) -> &str {
|
||||||
|
""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
trait State {}
|
trait State {}
|
||||||
|
|
Loading…
Reference in a new issue