pub struct ForEachRefHandler<Row, F> { /* private fields */ }Expand description
A handler that calls a closure for each row using zero-copy RefFromRow.
Unlike ForEachHandler, this handler uses RefFromRow to decode rows
as zero-copy references into the buffer. The closure receives a reference
to the decoded struct.
§Requirements
- The row type must implement
RefFromRow - All struct fields must use
LengthPrefixed<T>with big-endian types - All columns must be
NOT NULL
Implementations§
Source§impl<Row, F> ForEachRefHandler<Row, F>
impl<Row, F> ForEachRefHandler<Row, F>
Trait Implementations§
Source§impl<Row, F> ExtendedHandler for ForEachRefHandler<Row, F>
impl<Row, F> ExtendedHandler for ForEachRefHandler<Row, F>
Source§fn row(&mut self, cols: RowDescription<'_>, row: DataRow<'_>) -> Result<()>
fn row(&mut self, cols: RowDescription<'_>, row: DataRow<'_>) -> Result<()>
Called for each data row.
Source§fn result_start(&mut self, cols: RowDescription<'_>) -> Result<()>
fn result_start(&mut self, cols: RowDescription<'_>) -> Result<()>
Called when a result set begins.
Source§fn result_end(&mut self, complete: CommandComplete<'_>) -> Result<()>
fn result_end(&mut self, complete: CommandComplete<'_>) -> Result<()>
Called when a result set ends.
Auto Trait Implementations§
impl<Row, F> Freeze for ForEachRefHandler<Row, F>where
F: Freeze,
impl<Row, F> RefUnwindSafe for ForEachRefHandler<Row, F>where
F: RefUnwindSafe,
Row: RefUnwindSafe,
impl<Row, F> Send for ForEachRefHandler<Row, F>
impl<Row, F> Sync for ForEachRefHandler<Row, F>
impl<Row, F> Unpin for ForEachRefHandler<Row, F>
impl<Row, F> UnsafeUnpin for ForEachRefHandler<Row, F>where
F: UnsafeUnpin,
impl<Row, F> UnwindSafe for ForEachRefHandler<Row, F>where
F: UnwindSafe,
Row: 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