Skip to main content

InfallibleValueStorage

Trait InfallibleValueStorage 

Source
pub trait InfallibleValueStorage<T>: ValueStorage<T> {
    // Required method
    fn map_into_value<Output, Present>(
        storage: Self::Storage,
        present: Present,
    ) -> Output
       where Present: FnOnce(T) -> Output;
}
Expand description

Storage policies whose holder-to-model conversion cannot fail because the storage representation always contains a value.

Required Methods§

Source

fn map_into_value<Output, Present>( storage: Self::Storage, present: Present, ) -> Output
where Present: FnOnce(T) -> Output,

Convert storage into an output value without a missing-value fallback.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§