Struct kdb::Dictionary [−][src]
A key value based dictionary.
Implementations
impl Dictionary
[src]
pub fn len(&self) -> usize
[src]
The number of items in the dictionary.
pub fn is_empty(&self) -> bool
[src]
Returns true if the dictionary has no items.
pub fn keys(&self) -> &[KBox<Any>]
[src]
Gets a slice containing all the keys in this dictionary.
pub fn values(&self) -> &[KBox<Any>]
[src]
Gets a slice containing all the values in this dictionary.
pub fn insert(&mut self, key: impl Into<KBox<Any>>, value: impl Into<KBox<Any>>)
[src]
Insert a specified key and value at the end of the dictionary. No checks are done on uniqueness so duplicates are possible.
pub fn get<T: Into<KBox<Any>>>(&self, key: T) -> Option<&KBox<Any>>
[src]
Gets a value by key. Note that KDB dictionaries are treated as unordered and hence this is an O(n) operation.
pub fn iter(&self) -> impl Iterator<Item = (&KBox<Any>, &KBox<Any>)>
[src]
An iterator through every value in the KDB object
Trait Implementations
impl AsRef<Any> for Dictionary
[src]
impl<T> Index<T> for Dictionary where
T: Into<KBox<Any>>,
[src]
T: Into<KBox<Any>>,
impl TryFrom<&'_ Any> for &Dictionary
[src]
Auto Trait Implementations
impl RefUnwindSafe for Dictionary
[src]
impl !Send for Dictionary
[src]
impl !Sync for Dictionary
[src]
impl Unpin for Dictionary
[src]
impl UnwindSafe for Dictionary
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,