pub struct Unpacker { /* private fields */ }
Implementations§
Source§impl Unpacker
impl Unpacker
pub fn new() -> Unpacker
Sourcepub fn unpack<T>(&mut self, packed_object: &Value) -> Result<T, UnpackerError>where
for<'de> T: Deserialize<'de>,
pub fn unpack<T>(&mut self, packed_object: &Value) -> Result<T, UnpackerError>where
for<'de> T: Deserialize<'de>,
Unpack an packed object to its original input.
Sourcepub fn unpack_string(
&mut self,
packed_object: &Value,
) -> Result<String, UnpackerError>
pub fn unpack_string( &mut self, packed_object: &Value, ) -> Result<String, UnpackerError>
Unpack an object to a string.
Sourcepub fn set_max_dict_size(&mut self, value: u64)
pub fn set_max_dict_size(&mut self, value: u64)
Set the maximum dictionary size. Must match the dictionary size used by the packer. Default - 2000.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Unpacker
impl RefUnwindSafe for Unpacker
impl Send for Unpacker
impl Sync for Unpacker
impl Unpin for Unpacker
impl UnwindSafe for Unpacker
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