deserialize_from_slice requires vec or &[u8] live longer than object decoded. deserialize_from_vec may be helperful, and then we can transfer object decoded from one function to another function. thanks!