pub trait Table<'scope> {
type Nullify: Table<'scope>;
type Result;
// Required methods
fn visit(&self, f: &mut impl FnMut(&ErasedExpr));
fn visit_mut(&mut self, f: &mut impl FnMut(&mut ErasedExpr));
fn nullify(self) -> Self::Nullify;
}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))
fn visit(&self, f: &mut impl FnMut(&ErasedExpr))
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))
fn visit_mut(&mut self, f: &mut impl FnMut(&mut ErasedExpr))
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.
fn nullify(self) -> Self::Nullify
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.