Struct gdnative_visual_script::common::Dictionary [−]
pub struct Dictionary(_);
A reference-counted Dictionary of Variant key-value pairs.
Methods
impl Dictionary
impl Dictionarypub fn new() -> Dictionary
pub fn new() -> DictionaryCreates an empty Dictionary.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> boolReturns true if the Dictionary contains no elements.
pub fn len(&self) -> i32
pub fn len(&self) -> i32Returns the number of elements in the Dictionary.
pub fn clear(&mut self)
pub fn clear(&mut self)Clears the Dictionary, removing all key-value pairs.
pub fn contains(&self, key: &Variant) -> bool
pub fn contains(&self, key: &Variant) -> boolReturns true if the Dictionary contains the specified key.
pub fn contains_all(&self, keys: &VariantArray) -> bool
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)
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
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)
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
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
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
pub fn to_json(&self) -> GodotStringReturns a GodotString of the Dictionary.
pub fn keys(&self) -> VariantArray
pub fn keys(&self) -> VariantArrayReturns an array of the keys in the Dictionary.
pub fn values(&self) -> VariantArray
pub fn values(&self) -> VariantArrayReturns an array of the values in the Dictionary.
pub fn get_next(&self, key: &Variant) -> &Variant
pub fn get_next(&self, key: &Variant) -> &Variantpub fn hash(&self) -> i32
pub fn hash(&self) -> i32Return a hashed i32 value representing the dictionary's contents.
pub fn new_ref(&self) -> Dictionary
pub fn new_ref(&self) -> DictionaryTrait Implementations
impl ToVariant for Dictionary
impl ToVariant for Dictionaryfn to_variant(&self) -> Variant
fn to_variant(&self) -> Variantfn from_variant(variant: &Variant) -> Option<Dictionary>
fn from_variant(variant: &Variant) -> Option<Dictionary>impl Debug for Dictionary
impl Debug for Dictionaryfn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl<'l> From<&'l Dictionary> for Variant
impl<'l> From<&'l Dictionary> for Variantfn from(val: &'l Dictionary) -> Variant
fn from(val: &'l Dictionary) -> VariantPerforms the conversion.
impl Default for Dictionary
impl Default for Dictionaryfn default() -> Dictionary
fn default() -> DictionaryReturns the "default value" for a type. Read more
impl Eq for Dictionary
impl Eq for Dictionaryimpl Drop for Dictionary
impl Drop for Dictionaryimpl PartialEq<Dictionary> for Dictionary
impl PartialEq<Dictionary> for DictionaryAuto Trait Implementations
impl Send for Dictionary
impl Send for Dictionaryimpl Sync for Dictionary
impl Sync for Dictionary