LinuxStatFs

Struct LinuxStatFs 

Source
#[repr(C)]
pub struct LinuxStatFs { pub f_type: i64, pub f_bsize: i64, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_fsid: [i32; 2], pub f_namelen: i64, pub f_frsize: i64, pub f_flags: i64, pub f_spare: [i64; 4], }
Expand description

Linux statfs/statfs64 结构体(RISC-V 64位)

重要: 此结构体必须与 Linux 内核定义完全一致

参考:include/uapi/asm-generic/statfs.h

§字段说明

  • f_type: 文件系统类型魔数(使用 FileSystemType 枚举)
  • f_bsize: 最优传输块大小
  • f_blocks: 文件系统总块数
  • f_bfree: 空闲块数
  • f_bavail: 非特权用户可用块数
  • f_files: 总 inode 数
  • f_ffree: 空闲 inode 数
  • f_fsid: 文件系统 ID
  • f_namelen: 最大文件名长度
  • f_frsize: 片段大小
  • f_flags: 挂载标志(MountFlags)
  • f_spare: 保留字段(填充)

Fields§

§f_type: i64§f_bsize: i64§f_blocks: u64§f_bfree: u64§f_bavail: u64§f_files: u64§f_ffree: u64§f_fsid: [i32; 2]§f_namelen: i64§f_frsize: i64§f_flags: i64§f_spare: [i64; 4]

Implementations§

Source§

impl LinuxStatFs

Source

pub const fn zeroed() -> Self

创建零初始化的 statfs 结构

Trait Implementations§

Source§

impl Clone for LinuxStatFs

Source§

fn clone(&self) -> LinuxStatFs

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LinuxStatFs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for LinuxStatFs

Auto Trait Implementations§

§

impl Freeze for LinuxStatFs

§

impl RefUnwindSafe for LinuxStatFs

§

impl Send for LinuxStatFs

§

impl Sync for LinuxStatFs

§

impl Unpin for LinuxStatFs

§

impl UnwindSafe for LinuxStatFs

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.