Struct gdnative_core::Dictionary [−][src]
pub struct Dictionary(_);
A reference-counted Dictionary of Variant key-value pairs.
Methods
impl Dictionary[src]
impl Dictionarypub fn new() -> Self[src]
pub fn new() -> SelfCreates an empty Dictionary.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolReturns true if the Dictionary contains no elements.
pub fn len(&self) -> i32[src]
pub fn len(&self) -> i32Returns the number of elements in the Dictionary.
pub fn clear(&mut self)[src]
pub fn clear(&mut self)Clears the Dictionary, removing all key-value pairs.
pub fn contains(&self, key: &Variant) -> bool[src]
pub fn contains(&self, key: &Variant) -> boolReturns true if the Dictionary contains the specified key.
pub fn contains_all(&self, keys: &VariantArray) -> bool[src]
pub fn contains_all(&self, keys: &VariantArray) -> boolReturns true if the Dictionary has all of the keys in the given array.
pub fn erase(&mut self, key: &Variant)[src]
pub fn erase(&mut self, key: &Variant)Erase a key-value pair in the Dictionary by the specified key.
pub fn get(&self, key: &Variant) -> Variant[src]
pub fn get(&self, key: &Variant) -> VariantReturns a copy of the value corresponding to the key.
pub fn set(&mut self, key: &Variant, val: &Variant)[src]
pub fn set(&mut self, key: &Variant, val: &Variant)Sets a value to the element corresponding to the key.
pub fn get_ref(&self, key: &Variant) -> &Variant[src]
pub fn get_ref(&self, key: &Variant) -> &VariantReturns a reference to the value corresponding to the key.
pub fn get_mut_ref(&mut self, key: &Variant) -> &mut Variant[src]
pub fn get_mut_ref(&mut self, key: &Variant) -> &mut VariantReturns a mutable reference to the value corresponding to the key.
pub fn to_json(&self) -> GodotString[src]
pub fn to_json(&self) -> GodotStringReturns a GodotString of the Dictionary.
pub fn keys(&self) -> VariantArray[src]
pub fn keys(&self) -> VariantArrayReturns an array of the keys in the Dictionary.
pub fn values(&self) -> VariantArray[src]
pub fn values(&self) -> VariantArrayReturns an array of the values in the Dictionary.
pub fn get_next(&self, key: &Variant) -> &Variant[src]
pub fn get_next(&self, key: &Variant) -> &Variantpub fn hash(&self) -> i32[src]
pub fn hash(&self) -> i32Return a hashed i32 value representing the dictionary's contents.
pub fn new_ref(&self) -> Dictionary[src]
pub fn new_ref(&self) -> DictionaryTrait Implementations
impl<'l> From<&'l Dictionary> for Variant[src]
impl<'l> From<&'l Dictionary> for Variantfn from(val: &'l Dictionary) -> Variant[src]
fn from(val: &'l Dictionary) -> VariantPerforms the conversion.
impl Drop for Dictionary[src]
impl Drop for Dictionaryimpl Default for Dictionary[src]
impl Default for Dictionaryimpl PartialEq for Dictionary[src]
impl PartialEq for Dictionaryfn eq(&self, other: &Self) -> bool[src]
fn eq(&self, other: &Self) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Eq for Dictionary[src]
impl Eq for Dictionaryimpl ToVariant for Dictionary[src]
impl ToVariant for Dictionaryfn to_variant(&self) -> Variant[src]
fn to_variant(&self) -> Variantfn from_variant(variant: &Variant) -> Option<Self>[src]
fn from_variant(variant: &Variant) -> Option<Self>impl Debug for Dictionary[src]
impl Debug for DictionaryAuto Trait Implementations
impl Send for Dictionary
impl Send for Dictionaryimpl Sync for Dictionary
impl Sync for Dictionary