pub trait MapTable<'scope>: TableHKT {
// Required methods
fn map_modes<Mapper, DestMode>(
self,
mapper: &mut Mapper,
) -> Self::Of<DestMode>
where Mapper: ModeMapper<'scope, Self::Mode, DestMode>,
DestMode: TableMode;
fn map_modes_ref<Mapper, DestMode>(
&self,
mapper: &mut Mapper,
) -> Self::Of<DestMode>
where Mapper: ModeMapperRef<'scope, Self::Mode, DestMode>,
DestMode: TableMode;
fn map_modes_mut<Mapper, DestMode>(
&mut self,
mapper: &mut Mapper,
) -> Self::Of<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::Of<DestMode>
fn map_modes<Mapper, DestMode>(self, mapper: &mut Mapper) -> Self::Of<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::Of<DestMode>
fn map_modes_ref<Mapper, DestMode>( &self, mapper: &mut Mapper, ) -> Self::Of<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::Of<DestMode>
fn map_modes_mut<Mapper, DestMode>( &mut self, mapper: &mut Mapper, ) -> Self::Of<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", so this trait is not object safe.