IntoOwned

Trait IntoOwned 

Source
pub trait IntoOwned<K, V, S = FxBuildHasher> {
    // Required method
    fn into_owned(&self) -> HashMap<K, V, S>;
}

Required Methods§

Source

fn into_owned(&self) -> HashMap<K, V, S>

Returns an owned form of the object.

use cloudr::DataCloud;
use fxhash::FxHashMap;
use cloudr::IntoOwned;
 
let data: DataCloud<'_, String, String> = DataCloud::new();
let x = "Hello master".to_string();
let y = String::from("hello, world!");
data.insert("x".to_string(), &x);
data.insert("y".to_string(), &y);
 
let map: FxHashMap<String, String> = data.into_owned();

Implementors§

Source§

impl<'a, K: PartialEq + Eq + Hash + Clone, V: PartialEq + Eq + Clone, S: BuildHasher + Default> IntoOwned<K, V, S> for DataCloud<'a, K, V>