/// Initializes a *_VALUE block header.
Initializes a *_VALUE block header.
Initializes a * _VALUE block header .
fn write_value_header(
        &self,
        block_type: BlockType,
        name_index: u32,
        parent_index: u32,
    ) -> Result<(), Error> {
        if !block_type.is_any_value() {
            return Err(format_err!("Block type {} is not *_VALUE", block_type));
        }
        self.check_type(BlockType::Reserved)?;
        let mut header = self.read_header();
        header.set_block_type(block_type.to_u8().unwrap());
        header.set_value_name_index(name_index);
        header.set_value_parent_index(parent_index);
        self.write_header(header);
        Ok(())
    }
fn write_value_header ( & self , block_type : BlockType , name_index : u32 , parent_index : u32 , ) -> Result < ( ) , Error > { if ! block_type . is_any_value ( ) { return Err ( format_err ! ( " " block_type ) ) ; } self . check_type ( BlockType :: Reserved ) ? ; let mut header = self . read_header ( ) ; header . set_block_type ( block_type . to_u8 ( ) . unwrap ( ) ) ; header . set_value_name_index ( name_index ) ; header . set_value_parent_index ( parent_index ) ; self . write_header ( header ) ; Ok ( ( ) ) }
Initializes a *_VALUE block header.
Initializes a * _VALUE block header .
&self
block_type
BlockType
name_index
u32
parent_index
u32