serde
serde copied to clipboard
Specifying `bound`, `from`, `into`, `try_into` without using quotes
Quotes are ugly and they don't play well with rust-analyzer refactoring.
I propose this syntax:
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(
bound(
serialize(Value: Into<String> + Clone),
deserialize(String: Into<Value>),
),
from(String),
into(String),
)]
pub struct MyStruct<Value> {
pub value: Value,
}
This issue was inspired by derive_more v1.0.0-beta.3 where I don't need quotes in trait bound.