pub fn dictionary_put(
        &mut self,
        seed_uref: URef,
        dictionary_item_key: &str,
        cl_value: CLValue,
    ) -> Result<(), Error> {
        let dictionary_item_key_bytes = dictionary_item_key.as_bytes();

        if dictionary_item_key_bytes.len() > DICTIONARY_ITEM_KEY_MAX_LENGTH {
            return Err(Error::DictionaryItemKeyExceedsLength);
        }

        self.validate_writeable(&seed_uref.into())?;
        self.validate_uref(&seed_uref)?;

        self.validate_cl_value(&cl_value)?;

        let wrapped_cl_value = {
            let dictionary_value = DictionaryValue::new(
                cl_value,
                seed_uref.addr().to_vec(),
                dictionary_item_key_bytes.to_vec(),
            );
            CLValue::from_t(dictionary_value).map_err(Error::from)?
        };

        let dictionary_key = Key::dictionary(seed_uref, dictionary_item_key_bytes);
        self.metered_write_gs_unsafe(dictionary_key, wrapped_cl_value)?;
        Ok(())
    }
/// Puts a dictionary item key from a dictionary referenced by a `uref`.
Puts a dictionary item key from a dictionary referenced by a `uref`.
Puts a dictionary item key from a dictionary referenced by a ` uref ` .
pub fn dictionary_put(
        &mut self,
        seed_uref: URef,
        dictionary_item_key: &str,
        cl_value: CLValue,
    ) -> Result<(), Error> {
        let dictionary_item_key_bytes = dictionary_item_key.as_bytes();
        if dictionary_item_key_bytes.len() > DICTIONARY_ITEM_KEY_MAX_LENGTH {
            return Err(Error::DictionaryItemKeyExceedsLength);
        }
        self.validate_writeable(&seed_uref.into())?;
        self.validate_uref(&seed_uref)?;
        self.validate_cl_value(&cl_value)?;
        let wrapped_cl_value = {
            let dictionary_value = DictionaryValue::new(
                cl_value,
                seed_uref.addr().to_vec(),
                dictionary_item_key_bytes.to_vec(),
            );
            CLValue::from_t(dictionary_value).map_err(Error::from)?
        };
        let dictionary_key = Key::dictionary(seed_uref, dictionary_item_key_bytes);
        self.metered_write_gs_unsafe(dictionary_key, wrapped_cl_value)?;
        Ok(())
    }
pub fn dictionary_put ( & mut self , seed_uref : URef , dictionary_item_key : & str , cl_value : CLValue , ) -> Result < ( ) , Error > { let dictionary_item_key_bytes = dictionary_item_key . as_bytes ( ) ; if dictionary_item_key_bytes . len ( ) > DICTIONARY_ITEM_KEY_MAX_LENGTH { return Err ( Error :: DictionaryItemKeyExceedsLength ) ; } self . validate_writeable ( & seed_uref . into ( ) ) ? ; self . validate_uref ( & seed_uref ) ? ; self . validate_cl_value ( & cl_value ) ? ; let wrapped_cl_value = { let dictionary_value = DictionaryValue :: new ( cl_value , seed_uref . addr ( ) . to_vec ( ) , dictionary_item_key_bytes . to_vec ( ) , ) ; CLValue :: from_t ( dictionary_value ) . map_err ( Error :: from ) ? } ; let dictionary_key = Key :: dictionary ( seed_uref , dictionary_item_key_bytes ) ; self . metered_write_gs_unsafe ( dictionary_key , wrapped_cl_value ) ? ; Ok ( ( ) ) }
Puts a dictionary item key from a dictionary referenced by a `uref`.
Puts a dictionary item key from a dictionary referenced by a ` uref ` .
&mut self
seed_uref
URef
dictionary_item_key
&str
cl_value
CLValue
&mut self
seed_uref
URef
dictionary_item_key
&str
cl_value
CLValue