Trait winsafe::prelude::dshow_IEnumMediaTypes
source · pub trait dshow_IEnumMediaTypes: ole_IUnknown {
// Provided methods
fn iter(&self) -> impl Iterator<Item = HrResult<&AM_MEDIA_TYPE<'_>>> + '_ { ... }
fn Next(&self, mt: &mut AM_MEDIA_TYPE<'_>) -> HrResult<bool> { ... }
fn Reset(&self) -> HrResult<()> { ... }
fn Skip(&self, count: u32) -> HrResult<bool> { ... }
}
Available on crate features
kernel
and dshow
only.Expand description
This trait is enabled with the dshow
feature, and provides methods for
IEnumMediaTypes
.
Prefer importing this trait through the prelude:
use winsafe::prelude::*;
Provided Methods§
sourcefn iter(&self) -> impl Iterator<Item = HrResult<&AM_MEDIA_TYPE<'_>>> + '_
fn iter(&self) -> impl Iterator<Item = HrResult<&AM_MEDIA_TYPE<'_>>> + '_
Returns an iterator over the AM_MEDIA_TYPE
elements which calls
IEnumMediaTypes::next
internally.
§Examples
use winsafe::{self as w, prelude::*};
let types: w::IEnumMediaTypes; // initialized somewhere
for amt in types.iter() {
let amt = amt?;
println!("{} {}",
amt.majortype.to_string(), amt.lSampleSize);
}
sourcefn Next(&self, mt: &mut AM_MEDIA_TYPE<'_>) -> HrResult<bool>
fn Next(&self, mt: &mut AM_MEDIA_TYPE<'_>) -> HrResult<bool>
IEnumMediaTypes::Next
method.
Prefer using
IEnumMediaTypes::iter
,
which is simpler.
sourcefn Reset(&self) -> HrResult<()>
fn Reset(&self) -> HrResult<()>
IEnumMediaTypes::Reset
method.
Object Safety§
This trait is not object safe.