pub trait MapTable<'scope>: TableHKT {
// Required methods
fn map_modes<Mapper, DestMode>(
self,
mapper: &mut Mapper,
) -> Self::InMode<DestMode>
where Mapper: ModeMapper<'scope, Self::Mode, DestMode>,
DestMode: TableMode;
fn map_modes_ref<Mapper, DestMode>(
&self,
mapper: &mut Mapper,
) -> Self::InMode<DestMode>
where Mapper: ModeMapperRef<'scope, Self::Mode, DestMode>,
DestMode: TableMode;
fn map_modes_mut<Mapper, DestMode>(
&mut self,
mapper: &mut Mapper,
) -> Self::InMode<DestMode>
where Mapper: ModeMapperMut<'scope, Self::Mode, DestMode>,
DestMode: TableMode;
}Expand description
This trait allows us to change the mode of a table by mapping all the fields with ModeMapper, ModeMapperRef, or ModeMapperMut.
Required Methods§
Sourcefn map_modes<Mapper, DestMode>(
self,
mapper: &mut Mapper,
) -> Self::InMode<DestMode>
fn map_modes<Mapper, DestMode>( self, mapper: &mut Mapper, ) -> Self::InMode<DestMode>
Map each field of the table
The order and number of fields visited must always remain the same, across: Table::visit, Table::visit_mut, and all methods of MapTable.
Sourcefn map_modes_ref<Mapper, DestMode>(
&self,
mapper: &mut Mapper,
) -> Self::InMode<DestMode>
fn map_modes_ref<Mapper, DestMode>( &self, mapper: &mut Mapper, ) -> Self::InMode<DestMode>
Map each field of the table, with a reference
The order and number of fields visited must always remain the same, across: Table::visit, Table::visit_mut, and all methods of MapTable.
Sourcefn map_modes_mut<Mapper, DestMode>(
&mut self,
mapper: &mut Mapper,
) -> Self::InMode<DestMode>
fn map_modes_mut<Mapper, DestMode>( &mut self, mapper: &mut Mapper, ) -> Self::InMode<DestMode>
Map each field of the table, with a mutable reference
The order and number of fields 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".