Function hdd::drivedb::match_entry [] [src]

pub fn match_entry<'a>(
    id: &Id,
    db: &'a Vec<Entry>,
    extra_attributes: Vec<Attribute>
) -> Match<'a>

Matches given ATA IDENTIFY DEVICE response id against drive database db.

Return value is a merge between the default entry and the match; if multiple entries match the id, the first one is used (this is consistent with smartmontools' lookup_drive function). extra_attributes are also appended to the list of presets afterwards.

This functions skips USB ID entries.

Panics

This functions expects the first entry in the db to be the default one, and panics if there's no entries at all.