Struct hdrhistogram::serialization::Deserializer
source · pub struct Deserializer { /* private fields */ }
Expand description
Deserializer for all supported formats.
Since the serialization formats all include some magic bytes that allow reliable identification of the different formats, only one Deserializer implementation is needed.
Implementations§
source§impl Deserializer
impl Deserializer
sourcepub fn new() -> Deserializer
pub fn new() -> Deserializer
Create a new deserializer.
sourcepub fn deserialize<T: Counter, R: Read>(
&mut self,
reader: &mut R,
) -> Result<Histogram<T>, DeserializeError>
pub fn deserialize<T: Counter, R: Read>( &mut self, reader: &mut R, ) -> Result<Histogram<T>, DeserializeError>
Deserialize an encoded histogram from the provided reader.
Note that &[u8]
and Cursor
are convenient implementations of Read
if you have some
bytes already in slice or Vec
form.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Deserializer
impl RefUnwindSafe for Deserializer
impl Send for Deserializer
impl Sync for Deserializer
impl Unpin for Deserializer
impl UnwindSafe for Deserializer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more