pub struct RowWriter<'a> { /* private fields */ }Expand description
Streams encoded range rows directly into an RPC response frame.
A row has the wire layout klen | key | vlen | value, where both lengths
are big-endian u32 values. The writer preserves a checkpoint before each
row so a failed codec or an oversized response cannot leave a partial row
in the frame.
Implementations§
Source§impl<'a> RowWriter<'a>
impl<'a> RowWriter<'a>
Sourcepub fn new(
buf: &'a mut Vec<u8>,
limit: u32,
budget: usize,
collection: &'static str,
) -> Self
pub fn new( buf: &'a mut Vec<u8>, limit: u32, budget: usize, collection: &'static str, ) -> Self
Creates a writer for a response frame.
Auto Trait Implementations§
impl<'a> !UnwindSafe for RowWriter<'a>
impl<'a> Freeze for RowWriter<'a>
impl<'a> RefUnwindSafe for RowWriter<'a>
impl<'a> Send for RowWriter<'a>
impl<'a> Sync for RowWriter<'a>
impl<'a> Unpin for RowWriter<'a>
impl<'a> UnsafeUnpin for RowWriter<'a>
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