pub struct ForEachHandler<T, F> { /* private fields */ }Expand description
Handler that calls a closure for each row.
Implementations§
Trait Implementations§
Source§impl<T: for<'a> FromRow<'a>, F: FnMut(T) -> Result<()>> ExtendedHandler for ForEachHandler<T, F>
impl<T: for<'a> FromRow<'a>, F: FnMut(T) -> Result<()>> ExtendedHandler for ForEachHandler<T, 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.
Source§impl<T: for<'a> FromRow<'a>, F: FnMut(T) -> Result<()>> SimpleHandler for ForEachHandler<T, F>
impl<T: for<'a> FromRow<'a>, F: FnMut(T) -> Result<()>> SimpleHandler for ForEachHandler<T, 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<T, F> Freeze for ForEachHandler<T, F>where
F: Freeze,
impl<T, F> RefUnwindSafe for ForEachHandler<T, F>where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F> Send for ForEachHandler<T, F>
impl<T, F> Sync for ForEachHandler<T, F>
impl<T, F> Unpin for ForEachHandler<T, F>
impl<T, F> UnwindSafe for ForEachHandler<T, F>where
F: 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