blob: 71d0b17830304900744294709de2624569ccf444 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
use std::rc::Rc;
pub struct Message(Rc<String>);
impl Message {
pub fn string(&self) -> String {
self.0.to_string()
}
}
impl From<String> for Message {
fn from(s: String) -> Self {
Self(Rc::new(s))
}
}
|