pub struct OwnedProps { /* private fields */ }Expand description
A set of owned Props.
Properties are deduplicated, but the original iteration order is retained. If the collection is created from OwnedProps::collect_shared then cloning is also cheap.
§Implementation details
Internally, OwnedProps is backed by a hashtable to make key lookup efficient. Each entry in the table also forms a linked list in iteration order.
The hash algorithm used is FNV-1a.
Implementations§
Source§impl OwnedProps
impl OwnedProps
Sourcepub fn collect_owned(props: impl Props) -> OwnedProps
pub fn collect_owned(props: impl Props) -> OwnedProps
Collect a set of Props into an owned collection.
Cloning will involve cloning the collection.
Collect a set of Props into an owned collection.
Cloning will involve cloning the Arc, which may be cheaper than cloning the collection itself.
Get a new collection, taking an owned copy of the data in this one.
If the collection already contains an Arc value then this method is a cheap referenced counted clone.
Trait Implementations§
Source§impl Clone for OwnedProps
impl Clone for OwnedProps
Source§fn clone(&self) -> OwnedProps
fn clone(&self) -> OwnedProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Drop for OwnedProps
impl Drop for OwnedProps
Source§impl<'kv> FromProps<'kv> for OwnedProps
impl<'kv> FromProps<'kv> for OwnedProps
Source§fn from_props<P>(props: &'kv P) -> OwnedProps
fn from_props<P>(props: &'kv P) -> OwnedProps
P. Read moreSource§impl Props for OwnedProps
impl Props for OwnedProps
Source§fn for_each<'kv, F>(&'kv self, for_each: F) -> ControlFlow<()>
fn for_each<'kv, F>(&'kv self, for_each: F) -> ControlFlow<()>
Source§fn get<'v, K>(&'v self, key: K) -> Option<Value<'v>>where
K: ToStr,
fn get<'v, K>(&'v self, key: K) -> Option<Value<'v>>where
K: ToStr,
Source§fn is_unique(&self) -> bool
fn is_unique(&self) -> bool
Source§fn size(&self) -> Option<usize>
fn size(&self) -> Option<usize>
Source§fn pull<'kv, V, K>(&'kv self, key: K) -> Option<V>
fn pull<'kv, V, K>(&'kv self, key: K) -> Option<V>
V. Read more