pub trait Dummy<'t, 'a, S>: Sized {
type Out;
// Provided method
fn map_dummy<T>(
self,
f: impl FnMut(Self::Out) -> T + 't,
) -> impl Dummy<'t, 'a, S, Out = T> { ... }
}
Expand description
This trait is implemented by everything that can be retrieved from the database.
Implement it on custom structs using crate::FromDummy.
Required Associated Types§
Provided Methods§
sourcefn map_dummy<T>(
self,
f: impl FnMut(Self::Out) -> T + 't,
) -> impl Dummy<'t, 'a, S, Out = T>
fn map_dummy<T>( self, f: impl FnMut(Self::Out) -> T + 't, ) -> impl Dummy<'t, 'a, S, Out = T>
Map a dummy to another dummy using native rust.
This is useful when retrieving a struct from the database that contains types not supported by the database. It is also useful in migrations to process rows using arbitrary rust.
Object Safety§
This trait is not object safe.