pub struct BatchDecoder;Expand description
Batch decoding utilities for efficient bulk operations
§Examples
use chie_shared::encoding::{BatchEncoder, BatchDecoder};
// Encode and decode a batch of strings
let original = vec!["foo", "bar", "baz"];
let encoded = BatchEncoder::encode_strings(&original).unwrap();
let decoded = BatchDecoder::decode_strings(&encoded).unwrap();
assert_eq!(decoded, original);Implementations§
Source§impl BatchDecoder
impl BatchDecoder
Sourcepub fn decode_batch<T, F>(bytes: &[u8], decode_fn: F) -> ChieResult<Vec<T>>
pub fn decode_batch<T, F>(bytes: &[u8], decode_fn: F) -> ChieResult<Vec<T>>
Sourcepub fn decode_strings(bytes: &[u8]) -> ChieResult<Vec<String>>
pub fn decode_strings(bytes: &[u8]) -> ChieResult<Vec<String>>
Sourcepub fn decode_u64_batch(bytes: &[u8]) -> ChieResult<Vec<u64>>
pub fn decode_u64_batch(bytes: &[u8]) -> ChieResult<Vec<u64>>
Auto Trait Implementations§
impl Freeze for BatchDecoder
impl RefUnwindSafe for BatchDecoder
impl Send for BatchDecoder
impl Sync for BatchDecoder
impl Unpin for BatchDecoder
impl UnwindSafe for BatchDecoder
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