mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-28 18:40:38 +00:00
another attempt to reduce allocations, don't know if helpers, certainly didn't eliminate all of them
This commit is contained in:
@@ -161,6 +161,14 @@ pub trait BeSer {
|
||||
be_coder().deserialize_from(r).map_err(|e| e.into())
|
||||
}
|
||||
|
||||
/// Deserialize from a reader
|
||||
fn des_from_custom<'s, R: bincode::BincodeRead<'s>>(r: R) -> Result<Self, DeserializeError>
|
||||
where
|
||||
Self: DeserializeOwned,
|
||||
{
|
||||
be_coder().deserialize_from_custom(r).map_err(|e| e.into())
|
||||
}
|
||||
|
||||
/// Compute the serialized size of a data structure
|
||||
///
|
||||
/// Note: it may be faster to serialize to a buffer and then measure the
|
||||
|
||||
Reference in New Issue
Block a user