Crate fat_fs_types

Crate fat_fs_types 

Source
Expand description

§Rust crate fat_fs_types

Low-level #![no_std] helper library for accessing Microsoft’s FAT12/16/32 and exFAT file systems. Only defines constants, types and some very simple functions.

You will want to use one of the features zerocopy or bytemuck (together with the respective crate).

A lot of the structs in here only implement Copy if you have feature = "bytemuck" enabled since some of them are quite large. All #[repr(C)] structs with public fields have a stable layout, no padding and an alignment of 1.

§License

This crate is licensed under the MIT license.

Re-exports§

pub use bytemuck;
pub use zerocopy;

Modules§

exfat
exFAT.
fat
FAT12/16/32.

Structs§

ChsAddr
A cylinder-head-sector address in the format used by x86’s interrupt 0x13.
DiskGeometry
Hard disk geometry values used by x86’s interrupt 0x13.
PackDateError
Error thrown by pack_date.

Constants§

MAX_BLK_SIZE
MAX_YEAR
MIN_BLK_SIZE
MIN_YEAR
NONEXISTENT_CLUSTERS
Number of clusters that show up at the start of the FAT but don’t correspond to a heap allocation.

Functions§

pack_date
Encodes (year, month, day) into a packed native-endian FAT/exFAT date.
pack_time
Encodes (hours, minutes, millis) into a packed native-endian FAT/exFAT time, rounding down.
unpack_date
Decodes a packed native-endian FAT/exFAT date into (year, month, day).
unpack_time
Decodes a packed native-endian FAT/exFAT time into (hours, minutes, millis).

Type Aliases§

ClusterIdx
Guid
A globally unique identifier (usually called universally unique identifier/UUID outside the Microsoft world) with mixed endianness.
Lba
Logical block addressing address or offset.
U16Le
Unaligned little-endian 16-bit integer.
U32Le
Unaligned little-endian 32-bit integer.
U64Le
Unaligned little-endian 64-bit integer.