atat icon indicating copy to clipboard operation
atat copied to clipboard

Handle borrowed data

Open MathiasKoch opened this issue 4 years ago • 0 comments

When deserializing responses in serde, it should be possible to have responses with borrowed data, eg:

pub struct SocketData<'a> {
    pub socket: u8,
    pub data: &'a str,
}

ref: https://serde.rs/lifetimes.html

MathiasKoch avatar Mar 13 '20 19:03 MathiasKoch