I ran into this serde bug. It looks like BorrowCow in serde_with solves this issue well enough. I cannot update the bug to point this out for anyone that lands on the bug like I did. Could someone update the bug with an example?
eg
#[serde_as]
#[derive(Deserialize)]
pub struct Foo<'a> {
#[serde_as(as = "Option<BorrowCow>")]
pub bar: Option<Cow<'a, str>>
}