fn deserialize_compiled_script(binary: &[u8]) -> BinaryLoaderResult<CompiledScript> {
    let binary_len = binary.len();
    let mut cursor = VersionedCursor::new(binary)?;
    let table_count = load_table_count(&mut cursor)?;
    let mut tables: Vec<Table> = Vec::new();
    read_tables(&mut cursor, table_count, &mut tables)?;
    let content_len = check_tables(&mut tables, binary_len)?;

    let mut table_contents_buffer = Vec::new();
    let table_contents = read_table_contents(
        &mut cursor,
        &mut table_contents_buffer,
        content_len as usize,
    )?;

    let mut script = CompiledScript {
        version: cursor.version(),
        type_parameters: load_ability_sets(
            &mut cursor,
            AbilitySetPosition::FunctionTypeParameters,
        )?,
        parameters: load_signature_index(&mut cursor)?,
        code: load_code_unit(&mut cursor)?,
        ..Default::default()
    };

    build_compiled_script(&mut script, &table_contents, &tables)?;
    Ok(script)
}
/// Module internal function that manages deserialization of transactions.
Module internal function that manages deserialization of transactions.
Module internal function that manages deserialization of transactions .
fn deserialize_compiled_script(binary: &[u8]) -> BinaryLoaderResult<CompiledScript> {
    let binary_len = binary.len();
    let mut cursor = VersionedCursor::new(binary)?;
    let table_count = load_table_count(&mut cursor)?;
    let mut tables: Vec<Table> = Vec::new();
    read_tables(&mut cursor, table_count, &mut tables)?;
    let content_len = check_tables(&mut tables, binary_len)?;
    let mut table_contents_buffer = Vec::new();
    let table_contents = read_table_contents(
        &mut cursor,
        &mut table_contents_buffer,
        content_len as usize,
    )?;
    let mut script = CompiledScript {
        version: cursor.version(),
        type_parameters: load_ability_sets(
            &mut cursor,
            AbilitySetPosition::FunctionTypeParameters,
        )?,
        parameters: load_signature_index(&mut cursor)?,
        code: load_code_unit(&mut cursor)?,
        ..Default::default()
    };
    build_compiled_script(&mut script, &table_contents, &tables)?;
    Ok(script)
}
fn deserialize_compiled_script ( binary : & [ u8 ] ) -> BinaryLoaderResult < CompiledScript > { let binary_len = binary . len ( ) ; let mut cursor = VersionedCursor :: new ( binary ) ? ; let table_count = load_table_count ( & mut cursor ) ? ; let mut tables : Vec < Table > = Vec :: new ( ) ; read_tables ( & mut cursor , table_count , & mut tables ) ? ; let content_len = check_tables ( & mut tables , binary_len ) ? ; let mut table_contents_buffer = Vec :: new ( ) ; let table_contents = read_table_contents ( & mut cursor , & mut table_contents_buffer , content_len as usize , ) ? ; let mut script = CompiledScript { version : cursor . version ( ) , type_parameters : load_ability_sets ( & mut cursor , AbilitySetPosition :: FunctionTypeParameters , ) ? , parameters : load_signature_index ( & mut cursor ) ? , code : load_code_unit ( & mut cursor ) ? , .. Default :: default ( ) } ; build_compiled_script ( & mut script , & table_contents , & tables ) ? ; Ok ( script ) }
Module internal function that manages deserialization of transactions.
Module internal function that manages deserialization of transactions .
binary
&[u8]