pub struct UnchunkWriter<T, W>where
W: ObjectWriter<Vec<T>>,{
delegate: W,
chunk: Vec<T>,
chunk_size: usize,
}
Expand description
Wrap a writer of chunks to take individual values.
Fields§
§delegate: W
§chunk: Vec<T>
§chunk_size: usize
Implementations§
source§impl<T, W> UnchunkWriter<T, W>where
W: ObjectWriter<Vec<T>>,
impl<T, W> UnchunkWriter<T, W>where
W: ObjectWriter<Vec<T>>,
pub fn new(delegate: W) -> UnchunkWriter<T, W>
pub fn with_size(delegate: W, size: usize) -> UnchunkWriter<T, W>
Trait Implementations§
source§impl<T, W> ObjectWriter<T> for UnchunkWriter<T, W>where
W: ObjectWriter<Vec<T>>,
impl<T, W> ObjectWriter<T> for UnchunkWriter<T, W>where
W: ObjectWriter<Vec<T>>,
source§fn write_object(&mut self, obj: T) -> Result<()>
fn write_object(&mut self, obj: T) -> Result<()>
Write one object.
source§fn write_all_objects<I>(&mut self, objects: I) -> Result<usize>where
I: Iterator<Item = T>,
fn write_all_objects<I>(&mut self, objects: I) -> Result<usize>where
I: Iterator<Item = T>,
Write an iterator full of objects.
Auto Trait Implementations§
impl<T, W> RefUnwindSafe for UnchunkWriter<T, W>where
T: RefUnwindSafe,
W: RefUnwindSafe,
impl<T, W> Send for UnchunkWriter<T, W>
impl<T, W> Sync for UnchunkWriter<T, W>
impl<T, W> Unpin for UnchunkWriter<T, W>
impl<T, W> UnwindSafe for UnchunkWriter<T, W>where
T: UnwindSafe,
W: UnwindSafe,
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