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: data_object.rs
    path of file: ./repos/windows-rs/crates/tests/implement/tests
    
    the code of the file until where you have to start completion: #![allow(non_snake_case)]

use windows::{core::*, Win32::Foundation::*, Win32::System::Com::*};

#[derive(Default)]
struct TestData {
    GetData: bool,
    GetDataHere: bool,
    QueryGetData: bool,
    GetCanonicalFormatEtc: bool,
    SetData: bool,
    EnumFormatEtc: bool,
    DAdvise: bool,
    DUnadvise: bool,
    EnumDAdvise: bool,
}

#[implement(IDataObject)]
#[derive(Default)]
struct Test(std::cell::UnsafeCell<TestData>);

impl IDataObject_Impl for Test {
    fn GetData(&self, _: *const FORMATETC) -> Result<STGMEDIUM> {
        unsafe {
            (*self.0.get()).GetData = true;
            Ok(STGMEDIUM::default())
        }
    }

    fn GetDataHere(&self, _: *const FORMATETC, _: *mut STGMEDIUM) -> Result<()> {
        unsafe {
            (*self.0.get()).GetDataHere = true;
            Ok(())
        }
    }

    fn QueryGetData(&self, _: *const FORMATETC) -> HRESULT {
        unsafe {
            (*self.0.get()).QueryGetData = true;
            S_OK
        }
    }

    fn GetCanonicalFormatE
    
fn test() -> Result<()> {
    unsafe {
        let d: IDataObject = Test::default().into();
        d.GetData(&Default::default())?;
        d.GetDataHere(&Default::default(), &mut Default::default())?;
        d.QueryGetData(&Default::default()).ok()?;
        d.GetCanonicalFormatEtc(&Default::default(), &mut Default::default())
            .ok()?;
        d.SetData(&Default::default(), &Default::default(), false)?;

        // EnumFormatEtc returns a null result value with a successful (S_OK) return code.
        let r = d.EnumFormatEtc(0);
        assert!(r.is_err());
        let e = r.unwrap_err();
        assert!(e.code() == S_OK);
        assert!(e.as_ptr().is_null());

        d.DAdvise(&Default::default(), 0, None)?;

        let i = d.as_impl().0.get();
        assert!((*i).GetData);
        assert!((*i).GetDataHere);
        assert!((*i).QueryGetData);
        assert!((*i).GetCanonicalFormatEtc);
        assert!((*i).SetData);
        assert!((*i).EnumFormatEtc);
        assert!((*i).DAdvise);

        assert!(!(*i).DUnadvise);
        assert!(!(*i).EnumDAdvise);

        d.DUnadvise(0)?;
        _ = d.EnumDAdvise();

        assert!((*i).DUnadvise);
        assert!((*i).EnumDAdvise);

        Ok(())
    }
}