pub trait Table<'scope> {
type Result;
// Required methods
fn visit(&self, f: &mut impl FnMut(&ErasedExpr), mode: VisitTableMode);
fn visit_mut(
&mut self,
f: &mut impl FnMut(&mut ErasedExpr),
mode: VisitTableMode,
);
}Expand description
A trait that represents a database result row.
If you implement Table on your type, you must also implement ForLifetimeTable.
Required Associated Types§
Required Methods§
Sourcefn visit(&self, f: &mut impl FnMut(&ErasedExpr), mode: VisitTableMode)
fn visit(&self, f: &mut impl FnMut(&ErasedExpr), mode: VisitTableMode)
Visit each expr in the table.
The order and number of expressions visited must always remain the same, across: Table::visit, Table::visit_mut, and all methods of MapTable.
Sourcefn visit_mut(
&mut self,
f: &mut impl FnMut(&mut ErasedExpr),
mode: VisitTableMode,
)
fn visit_mut( &mut self, f: &mut impl FnMut(&mut ErasedExpr), mode: VisitTableMode, )
Visit each expr in the table, with a mutable reference.
The order and number of expressions visited must always remain the same, across: Table::visit, Table::visit_mut, and all methods of MapTable.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<'scope, T> Table<'scope> for (T₁, T₂, …, Tₙ)where
T: Table<'scope>,
This trait is implemented for tuples up to 15 items long.
impl<'scope, T> Table<'scope> for (T₁, T₂, …, Tₙ)where
T: Table<'scope>,
This trait is implemented for tuples up to 15 items long.