Can I write some code to get a lifetime value deref from a none lifetime value ?
struct A {
x: String,
}
struct B<'a> {
y: &<'a> str,
}
impl Deref for A {
type Target = B;
fn deref(&self) -> &Self::Target {
&B{y: &self.x}
}
}
New contributor
2