pub fn array_set_string_slot(&self, slot_index: usize, string_index: u32) -> Result<(), Error> {
        self.check_array_entry_type(BlockType::StringReference)?;
        self.check_array_index(slot_index)?;
        // 0 is used as special value; the reader won't dereference it
        if string_index != constants::EMPTY_STRING_SLOT_INDEX {
            self.check_type_at(string_index, BlockType::StringReference)?;
        }

        let type_size = self.array_entry_type_size()?;
        self.container.write_bytes(
            utils::offset_for_index(self.index + 1) + slot_index * type_size,
            &string_index.to_le_bytes(),
        );

        Ok(())
    }
/// Sets the value of a string ARRAY_VALUE block.
Sets the value of a string ARRAY_VALUE block.
Sets the value of a string ARRAY_VALUE block .
pub fn array_set_string_slot(&self, slot_index: usize, string_index: u32) -> Result<(), Error> {
        self.check_array_entry_type(BlockType::StringReference)?;
        self.check_array_index(slot_index)?;
        // 0 is used as special value; the reader won't dereference it
        if string_index != constants::EMPTY_STRING_SLOT_INDEX {
            self.check_type_at(string_index, BlockType::StringReference)?;
        }
        let type_size = self.array_entry_type_size()?;
        self.container.write_bytes(
            utils::offset_for_index(self.index + 1) + slot_index * type_size,
            &string_index.to_le_bytes(),
        );
        Ok(())
    }
pub fn array_set_string_slot ( & self , slot_index : usize , string_index : u32 ) -> Result < ( ) , Error > { self . check_array_entry_type ( BlockType :: StringReference ) ? ; self . check_array_index ( slot_index ) ? ; // 0 is used as special value; the reader won't dereference it if string_index != constants :: EMPTY_STRING_SLOT_INDEX { self . check_type_at ( string_index , BlockType :: StringReference ) ? ; } let type_size = self . array_entry_type_size ( ) ? ; self . container . write_bytes ( utils :: offset_for_index ( self . index + 1 ) + slot_index * type_size , & string_index . to_le_bytes ( ) , ) ; Ok ( ( ) ) }
Sets the value of a string ARRAY_VALUE block.
Sets the value of a string ARRAY_VALUE block .
&self
slot_index
usize
string_index
u32
&self
slot_index
usize
string_index
u32