pub(crate) fn deserialize<'de, T: Deserialize<'de>>(
    buf: &[u8],
) -> ::std::result::Result<T, Box<dyn std::error::Error + Send + Sync>> {
    let mut de = Deserializer::new(Cursor::new(buf));
    match Deserialize::deserialize(&mut de) {
        Ok(t) => Ok(t),
        Err(e) => Err(format!("Failed to de-serialize: {}", e).into()),
    }
}
/// The standard function for de-serializing codec structs from a format suitable
/// for message exchange between actor and host. Use of any other function to
/// deserialize could result in breaking incompatibilities.
The standard function for de-serializing codec structs from a format suitable
for message exchange between actor and host. Use of any other function to
deserialize could result in breaking incompatibilities.
The standard function for de - serializing codec structs from a format suitable for message exchange between actor and host . Use of any other function to deserialize could result in breaking incompatibilities .
pub(crate) fn deserialize<'de, T: Deserialize<'de>>(
    buf: &[u8],
) -> ::std::result::Result<T, Box<dyn std::error::Error + Send + Sync>> {
    let mut de = Deserializer::new(Cursor::new(buf));
    match Deserialize::deserialize(&mut de) {
        Ok(t) => Ok(t),
        Err(e) => Err(format!("Failed to de-serialize: {}", e).into()),
    }
}
pub ( crate ) fn deserialize < ' de , T : Deserialize < ' de > > ( buf : & [ u8 ] , ) -> :: std :: result :: Result < T , Box < dyn std :: error :: Error + Send + Sync > > { let mut de = Deserializer :: new ( Cursor :: new ( buf ) ) ; match Deserialize :: deserialize ( & mut de ) { Ok ( t ) => Ok ( t ) , Err ( e ) => Err ( format ! ( " " e ) . into ( ) ) , } }
The standard function for de-serializing codec structs from a format suitable
for message exchange between actor and host.
The standard function for de - serializing codec structs from a format suitable for message exchange between actor and host .
buf
&[u8]
buf
&[u8]