[−][src]Module pstoedit::driver_info
Information on pstoedit drivers.
Inquire information on drivers using DriverInfo::get
or
DriverInfo::get_native
, and iterate over it to yield a
DriverDescription
for each driver.
Examples
use std::collections::HashSet; use pstoedit::DriverInfo; pstoedit::init()?; let drivers = DriverInfo::get()?; let native_drivers = DriverInfo::get_native()?; // The number of non-native drivers cannot be negative let num = drivers.iter().count(); let num_native = native_drivers.iter().count(); assert!(num >= num_native); // Ensure all drivers have a unique symbolic name let mut formats = HashSet::new(); for driver in &drivers { assert!(formats.insert(driver.symbolic_name()?)); } // Ensure all native drivers are included in the list of all drivers for driver in &native_drivers { assert!(formats.contains(driver.symbolic_name()?)); }
Structs
DriverDescription | Description of pstoedit driver. |
DriverInfo | Information on pstoedit drivers. |
Iter | Iterator over drivers in |