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: bench.rs
    path of file: ./repos/webrtc/turn/benches
    
    the code of the file until where you have to start completion: use std::time::Duration;

use criterion::{criterion_group, criterion_main, Criterion};
use stun::attributes::ATTR_DATA;
use stun::message::{Getter, Message, Setter};
use turn::proto::chandata::ChannelData;
use turn::proto::channum::{ChannelNumber, MIN_CHANNEL_NUMBER};
use turn::proto::data::Data;
use turn::proto::lifetime::Lifetime;

fn benchmark_chan_data(c: &mut Criterion) {
    {
        let buf = [64, 0, 0, 0, 0, 4, 0, 0, 1, 2, 3];
        c.bench_function("BenchmarkIsChannelData", |b| {
            b.iter(|| {
                assert!(ChannelData::is_channel_data(&buf));
            })
        });
    }

    {
        let mut d = ChannelData {
            data: vec![1, 2, 3, 4],
            number: ChannelNumber(MIN_CHANNEL_NUMBER + 1),
            raw: vec![],
        };
    
fn benchmark_chan_data(c: &mut Criterion) {
    {
        let buf = [64, 0, 0, 0, 0, 4, 0, 0, 1, 2, 3];
        c.bench_function("BenchmarkIsChannelData", |b| {
            b.iter(|| {
                assert!(ChannelData::is_channel_data(&buf));
            })
        });
    }

    {
        let mut d = ChannelData {
            data: vec![1, 2, 3, 4],
            number: ChannelNumber(MIN_CHANNEL_NUMBER + 1),
            raw: vec![],
        };
        c.bench_function("BenchmarkChannelData_Encode", |b| {
            b.iter(|| {
                d.encode();
                d.reset();
            })
        });
    }

    {
        let mut d = ChannelData {
            data: vec![1, 2, 3, 4],
            number: ChannelNumber(MIN_CHANNEL_NUMBER + 1),
            raw: vec![],
        };
        d.encode();
        let mut buf = vec![0u8; d.raw.len()];
        buf.copy_from_slice(&d.raw);
        c.bench_function("BenchmarkChannelData_Decode", |b| {
            b.iter(|| {
                d.reset();
                d.raw = buf.clone();
                d.decode().unwrap();
            })
        });
    }
}