MCPcopy Create free account
hub / github.com/InkSha/rust-tutorial / serialize

Method serialize

src/todo/core.rs:70–72  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

68 Self: Sized + Serialize + for<'a> Deserialize<'a>,
69{
70 fn serialize(&self) -> String {
71 serde_json::to_string(self).unwrap()
72 }
73
74 fn deserialize<S: Into<String>>(s: S) -> Self {
75 serde_json::from_str(&s.into()).unwrap()

Callers 1

Implementers 1

core.rssrc/todo/core.rs

Calls

no outgoing calls

Tested by 1