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> Freeze for UnchunkWriter<T, W>where
W: Freeze,
impl<T, W> RefUnwindSafe for UnchunkWriter<T, W>where
W: RefUnwindSafe,
T: 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
W: UnwindSafe,
T: 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