[−][src]Crate libblkid_rs
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&Pathin the bindings and provides libblkid with the desired file descriptor.
List of methods not included
blkid_verify- This method is not included because the struct flag that will notify the caller of whether it succeeded or not cannot be accessed from the public API.
Re-exports
pub use crate::consts::*; |
Modules
| consts | Module containing all typed constants |
Structs
| BlkidCache | Data structure representing cache in libblkid |
| BlkidDev | Block device found by blkid |
| BlkidDevIter | Iterator for blkid-discovered block devices |
| BlkidDevno | Device number |
| BlkidPartition | A handle for working with a probed partition. |
| BlkidPartlist | A handle for traversing a list of partitions. |
| BlkidParttable | A handle for working with partition tables. |
| BlkidProbe | A structure for probing block devices. |
| BlkidSectors | A struct representing a count with units of sectors. |
| BlkidTagIter | Iterator for tags associated with a device |
| BlkidTopology | A handle for traversing the blkid topology of devices. |
| Uuid | A Universally Unique Identifier (UUID). |
Enums
| BlkidErr | Error representing all errors returned by binding methods |
Functions
| encode_string | Encode potentially unsafe characters in the given |
| evaluate_spec | Find the path of a device matching an unparsed tag or a path to a device mapper
node such as |
| 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 Definitions
| Result | Re-export of |
| blkid_loff_t |