mirror of
https://github.com/serde-rs/serde.git
synced 2025-09-27 04:50:36 +00:00
24 lines
328 B
Rust
24 lines
328 B
Rust
use serde::de::Deserialize;
|
|
use serde::ser::Serialize;
|
|
|
|
fn to_string<T>(_: &T) -> String
|
|
where
|
|
T: Serialize,
|
|
{
|
|
unimplemented!()
|
|
}
|
|
|
|
fn from_str<'de, T>(_: &'de str) -> T
|
|
where
|
|
T: Deserialize<'de>,
|
|
{
|
|
unimplemented!()
|
|
}
|
|
|
|
struct MyStruct;
|
|
|
|
fn main() {
|
|
to_string(&MyStruct);
|
|
let _: MyStruct = from_str("");
|
|
}
|