[−][src]Struct hdd::drivedb::Loader
Use this helper to load entries from drivedb.h
.
It is also possible to use Loader
to create dummy database in case if only user-defined attributes (or none at all) are needed: just call db()
right after creating the loader.
Implementations
impl Loader
[src]
pub fn new() -> Self
[src]
pub fn load(&mut self, file: &str) -> Result<(), Error>
[src]
Loads entries from main drivedb file.
Entries from previously loaded main file will be discarded; entries from additional files will not be affected.
Errors
Returns enum Error if:
- it encounters any kind of I/O error,
- drive database is malformed.
pub fn load_additional(&mut self, file: &str) -> Result<(), Error>
[src]
Loads more entries from additional drivedb file. Additional entries always take precedence over the ones from the main file.
Errors
Returns enum Error if:
- it encounters any kind of I/O error,
- drive database is malformed.
pub fn db(self) -> DriveDB
[src]
Returns actual drive database with all entries loaded beforehand.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Loader
impl Send for Loader
impl Sync for Loader
impl Unpin for Loader
impl UnwindSafe for Loader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,