Struct gdal::DriverManager
source · pub struct DriverManager;
Expand description
A wrapper around GDALDriverManager
.
This struct helps listing and registering Driver
s.
Implementations§
source§impl DriverManager
impl DriverManager
sourcepub fn count() -> usize
pub fn count() -> usize
Returns the number of registered drivers.
Example
use gdal::DriverManager;
println!("{} drivers are registered", DriverManager::count());
203 drivers are registered
sourcepub fn get_driver(index: usize) -> Result<Driver>
pub fn get_driver(index: usize) -> Result<Driver>
Returns the driver with the given index, which must be less than the value returned by
DriverManager::count()
.
See also: count
Example
use gdal::DriverManager;
assert!(DriverManager::count() > 0);
let d = DriverManager::get_driver(0)?;
println!("'{}' is '{}'", d.short_name(), d.long_name());
'VRT' is 'Virtual Raster'
sourcepub fn get_driver_by_name(name: &str) -> Result<Driver>
pub fn get_driver_by_name(name: &str) -> Result<Driver>
sourcepub fn register_driver(driver: &Driver) -> usize
pub fn register_driver(driver: &Driver) -> usize
Register a driver for use.
Wraps GDALRegisterDriver()
sourcepub fn deregister_driver(driver: &Driver)
pub fn deregister_driver(driver: &Driver)
Deregister the passed driver.
Wraps GDALDeregisterDriver()
sourcepub fn register_all()
pub fn register_all()
Register all known GDAL drivers.
Wraps GDALAllRegister()
sourcepub fn prevent_auto_registration()
pub fn prevent_auto_registration()
Prevents the automatic registration of all known GDAL drivers when first calling create, open, etc.
Auto Trait Implementations§
impl RefUnwindSafe for DriverManager
impl Send for DriverManager
impl Sync for DriverManager
impl Unpin for DriverManager
impl UnwindSafe for DriverManager
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more