pub trait IntoOwned<K, V, S = FxBuildHasher> {
// Required method
fn into_owned(&self) -> HashMap<K, V, S>;
}Required Methods§
Sourcefn into_owned(&self) -> HashMap<K, V, S>
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();