pub(crate) fn metered_write_gs_unsafe<K, V>(&mut self, key: K, value: V) -> Result<(), Error>
    where
        K: Into<Key>,
        V: Into<StoredValue>,
    {
        let stored_value = value.into();

        // Charge for amount as measured by serialized length
        let bytes_count = stored_value.serialized_length();
        self.charge_gas_storage(bytes_count)?;

        self.tracking_copy
            .borrow_mut()
            .write(key.into(), stored_value);
        Ok(())
    }
/// Writes data to global state with a measurement.
///
/// Use with caution - there is no validation done as the key is assumed to be validated
/// already.
Writes data to global state with a measurement.
Use with caution - there is no validation done as the key is assumed to be validated
already.
Writes data to global state with a measurement . Use with caution - there is no validation done as the key is assumed to be validated already .
pub(crate) fn metered_write_gs_unsafe<K, V>(&mut self, key: K, value: V) -> Result<(), Error>
    where
        K: Into<Key>,
        V: Into<StoredValue>,
    {
        let stored_value = value.into();
        // Charge for amount as measured by serialized length
        let bytes_count = stored_value.serialized_length();
        self.charge_gas_storage(bytes_count)?;
        self.tracking_copy
            .borrow_mut()
            .write(key.into(), stored_value);
        Ok(())
    }
pub ( crate ) fn metered_write_gs_unsafe < K , V > ( & mut self , key : K , value : V ) -> Result < ( ) , Error > where K : Into < Key > , V : Into < StoredValue > , { let stored_value = value . into ( ) ; // Charge for amount as measured by serialized length let bytes_count = stored_value . serialized_length ( ) ; self . charge_gas_storage ( bytes_count ) ? ; self . tracking_copy . borrow_mut ( ) . write ( key . into ( ) , stored_value ) ; Ok ( ( ) ) }
Writes data to global state with a measurement.
Writes data to global state with a measurement .
&mut self
key
K
value
V
&mut self
key
K
value
V