trait BlockDriver {
int read(unsigned long lba, []unsigned char buf);
int write(unsigned long lba, []const unsigned char buf);
}What a block driver provides: whole-sector reads and writes at a sector address, 0 on success. A buffer covers buf.len / sector_size sectors (the device's sector_size), and its length is a multiple of it. BlockDevice::new takes any such type, and a BlockDevice has the same methods, so it is one too.