Trait winsafe::prelude::dxgi_IDXGIAdapter

source ·
pub trait dxgi_IDXGIAdapter: dxgi_IDXGIObject {
    // Provided methods
    fn CheckInterfaceSupport(&self, interface_name: &GUID) -> HrResult<i64> { ... }
    fn EnumOutputs(&self) -> impl Iterator<Item = HrResult<IDXGIOutput>> + '_ { ... }
    fn GetDesc(&self, desc: &mut DXGI_ADAPTER_DESC) -> HrResult<()> { ... }
}
Available on crate features kernel and dxgi only.
Expand description

This trait is enabled with the dxgi feature, and provides methods for IDXGIAdapter.

Prefer importing this trait through the prelude:

use winsafe::prelude::*;

Provided Methods§

source

fn CheckInterfaceSupport(&self, interface_name: &GUID) -> HrResult<i64>

source

fn EnumOutputs(&self) -> impl Iterator<Item = HrResult<IDXGIOutput>> + '_

IDXGIAdapter::EnumOutputs method.

Returns an iterator over IDXGIOutput elements.

§Examples
use winsafe::{self as w, prelude::*};

let adapter: w::IDXGIAdapter; // initialized somewhere

for output in adapter.EnumOutputs() {
    let output = output?;
    // ...
}

// Collecting into a Vec
let outputs: Vec<w::IDXGIOutput> =
    adapter.EnumOutputs()
        .collect::<w::HrResult<Vec<_>>>()?;
source

fn GetDesc(&self, desc: &mut DXGI_ADAPTER_DESC) -> HrResult<()>

IDXGIAdapter::GetDesc method.

§Examples
use winsafe::{self as w, prelude::*};

let adapter: w::IDXGIAdapter; // initialized somewhere
let mut desc = w::DXGI_ADAPTER_DESC::default();

adapter.GetDesc(&mut desc)?;

Object Safety§

This trait is not object safe.

Implementors§