pub trait DeviceQuery<'a>: Iterator<Item = &'a Device> {
// Required methods
fn available(self) -> Available<'a, Self>;
fn by_name<'b>(self, name: &'b str) -> ByName<'a, 'b, Self>;
}
Expand description
Trait that makes it easy to filter an iterator over devices by availability or name.
Required Methods§
Sourcefn available(self) -> Available<'a, Self>
fn available(self) -> Available<'a, Self>
Filters this iterator down to only available devices.
Sourcefn by_name<'b>(self, name: &'b str) -> ByName<'a, 'b, Self>
fn by_name<'b>(self, name: &'b str) -> ByName<'a, 'b, Self>
Filters this iterator down to only devices with a matching name. Note that names are not necessarily unique. Trivially, they can be shared among several devices of the same type but with different runtimes (e.g. iOS 11.0 and iOS 12.0).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.