Expand description
§libblkid-rs
libblkid_rs
provides programmatic access in Rust to the C library
libblkid
.
§Design
The organization of the modules reflects the organization of the modules in the C library. The main goal of this library is to maintain the same general structure while taking advantage of Rust idioms.
§List of methods modified
blkid_devno_to_wholedisk
- This bindings method handles the buffer internally and therefore does not require a buffer argument. The limit for the maximum size of the returned device name is 4096 bytes. Please open an issue if more characters are required.blkid_get_dev_size
- This method takes a&Path
in the bindings and provides libblkid with the desired file descriptor.
Re-exports§
pub use crate::consts::*;
Modules§
- consts
- Module containing all typed constants
Structs§
- Blkid
Cache - Data structure representing cache in libblkid
- Blkid
Dev - Block device found by blkid
- Blkid
DevIter - Iterator for blkid-discovered block devices
- Blkid
Devno - Device number
- Blkid
Partition - A handle for working with a probed partition.
- Blkid
Partlist - A handle for traversing a list of partitions.
- Blkid
Parttable - A handle for working with partition tables.
- Blkid
Probe - A structure for probing block devices.
- Blkid
Sectors - A struct representing a count with units of sectors.
- Blkid
TagIter - Iterator for tags associated with a device
- Blkid
Topology - A handle for traversing the blkid topology of devices.
- Uuid
- A Universally Unique Identifier (UUID).
Enums§
- Blkid
Err - Error representing all errors returned by binding methods
Functions§
- encode_
string - Encode potentially unsafe characters in the given
string
parameter. - evaluate_
spec - Find the path of a device matching an unparsed tag or a path to a device mapper
node such as
/dev/dm-0
- evaluate_
tag - Find the path of a device matching a tag
- get_
library_ version - Get library version
- get_
partition_ name - Get the name of a partition type at the given index in the libblkid internal state.
- get_
superblock_ name - Get the name and flags of a superblock at the given index in the libblkid internal state.
- is_
known_ fs_ type - Check if the given string containing a filesystem name is a known filesystem type.
- is_
known_ partition_ type - Checks whether the name provided is a known partition type.
- parse_
tag_ string - Parse a tag string into a tuple of type and value
- parse_
version_ string - Parse a version string into a version code
- safe_
string - Generate a safe string that allows ascii, hex-escaping, and utf8. Whitespaces
become
_
. - send_
uevent - Send a uevent to a device specified by the device path
Type Aliases§
- Result
- Re-export of
Result
with an error type ofBlkidErr
- blkid_
loff_ t