You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: digest.rs
    path of file: ./repos/lagon/crates/runtime_isolate/src/bindings/crypto
    
    the code of the file until where you have to start completion: use anyhow::Result;
use lagon_runtime_crypto::{extract_algorithm_object_or_string, methods::digest};
use lagon_runtime_v8_utils::extract_v8_uint8array;

use crate::bindings::{BindingResult, PromiseResult};

type Arg = (String, Vec<u8>);

pub fn digest_init(
    scope: &mut 
    
pub async fn digest_binding(id: usize, arg: Arg) -> BindingResult {
    let name = arg.0;
    let data = arg.1;

    match digest(name.as_str(), data) {
        Ok(result) => BindingResult {
            id,
            result: PromiseResult::ArrayBuffer(result),
        },
        Err(error) => BindingResult {
            id,
            result: PromiseResult::Error(error.to_string()),
        },
    }
}