Skip to main content

ModeMapper

Trait ModeMapper 

Source
pub trait ModeMapper<'scope, SrcMode: TableMode, DestMode: TableMode> {
    // Required method
    fn map_mode<V>(
        &mut self,
        src: SrcMode::T<'scope, V>,
    ) -> DestMode::T<'scope, V>
       where V: Value;
}
Expand description

This trait allows us to write a mapping function between two column modes.

We use a trait as we need this to work for all types of the type parameter V.

Required Methods§

Source

fn map_mode<V>(&mut self, src: SrcMode::T<'scope, V>) -> DestMode::T<'scope, V>
where V: Value,

Map from SrcMode to DestMode, consuming the value.

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.

Implementors§