Skip to main content

EntryExt

Trait EntryExt 

Source
pub trait EntryExt<'a, K: 'a, V: 'a> {
    // Required method
    fn or_insert_with_fallible<E, F: FnOnce() -> Result<V, E>>(
        self,
        default: F,
    ) -> Result<&'a mut V, E>;
}
Expand description

Trait to add helper methods on map-like entry types.

Required Methods§

Source

fn or_insert_with_fallible<E, F: FnOnce() -> Result<V, E>>( self, default: F, ) -> Result<&'a mut V, E>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'a, K: 'a, V: 'a> EntryExt<'a, K, V> for Entry<'a, K, V>

Source§

fn or_insert_with_fallible<E, F: FnOnce() -> Result<V, E>>( self, default: F, ) -> Result<&'a mut V, E>

Source§

impl<'a, K: Ord + 'a, V: 'a> EntryExt<'a, K, V> for Entry<'a, K, V>

Source§

fn or_insert_with_fallible<E, F: FnOnce() -> Result<V, E>>( self, default: F, ) -> Result<&'a mut V, E>

Implementors§