Crate libmount [] [src]

libmount

This library has two major goals:

  1. Add type-safe interface for mount() system call
  2. Add very good explanation of what's wrong when the call fails

So we have two error types:

  1. OSError holds mount info and errno
  2. Error is returned by OSError::explain()

The first one is returned by bare_mount() the second by mount(), and using latter is preffered for most situations. Unless performance is too critical (i.e. you are doing thousands of failing mounts per second). On the success path there is no overhead.

Structs

BindMount

A mount bind definition

Error

The error holder which contains as much information about why failure happens as the library implementors could gain

Move

A move operation definition

OSError

The raw os error

Overlay

An overlay mount point

Remount

A remount definition

Tmpfs

A tmpfs mount definition