[][src]Struct dpdk_unix::android_linux::mounts::HugePageMountSettings

pub struct HugePageMountSettings {
    pub mount_point: PathBuf,
    pub user_id: uid_t,
    pub group_id: gid_t,
    pub mode: mode_t,
    pub maximum_value_of_memory_in_bytes: Option<u64>,
    pub minimum_value_of_memory_in_bytes: Option<u64>,
    pub maximum_number_of_inodes: Option<u64>,
    pub mount_flags: MountFlags,
}

Settings for mounting a hugetlbfs file system.

Fields

mount_point: PathBuf

Mount point for huge pages file system.

There is no real standard; we default to /dev/hugepages, this being the default used by the Ubuntu official deb package and similar in spirit to /dev/shm. Other options include:-

user_id: uid_t

User id (uid), eg 0.

group_id: gid_t

Group id (gid), eg 0.

mode: mode_t

Permissions mode.

Debian uses 1770 for mode.

maximum_value_of_memory_in_bytes: Option<u64>

eg None.

minimum_value_of_memory_in_bytes: Option<u64>

eg None.

maximum_number_of_inodes: Option<u64>

eg None.

mount_flags: MountFlags

eg MountFlags::DoNotUpdateAccessTimes | MountFlags::DoNotAllowProgramsToBeExecuted | MountFlags::DoNotHonourSetUidAndSetGidPermissions.

Methods

impl HugePageMountSettings[src]

pub fn mount(&self, sys_path: &SysPath) -> bool[src]

Creates the required mount point then mounts hugetlbfs.

Panics if mount already exists and is not a directory.

Returns true if the mount point was created or false if it already existed.

Trait Implementations

impl Eq for HugePageMountSettings[src]

impl Clone for HugePageMountSettings[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialOrd<HugePageMountSettings> for HugePageMountSettings[src]

impl PartialEq<HugePageMountSettings> for HugePageMountSettings[src]

impl Default for HugePageMountSettings[src]

impl Ord for HugePageMountSettings[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Hash for HugePageMountSettings[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for HugePageMountSettings[src]

impl Serialize for HugePageMountSettings[src]

impl<'de> Deserialize<'de> for HugePageMountSettings where
    HugePageMountSettings: Default
[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]