#[repr(C)]pub struct Rlimit {
pub curr: usize,
pub max: usize,
}Expand description
资源限制结构体(对应 C 的 struct rlimit)
用于描述进程对某种资源的当前限制和最大限制
Fields§
§curr: usize当前资源软限制(soft limit),即实际生效的限制值
进程可以在不超过 max 的情况下修改它
max: usize最大资源限制(hard limit),软限制不能超过该值 只有具有特权的进程才能提升此值
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rlimit
impl RefUnwindSafe for Rlimit
impl Send for Rlimit
impl Sync for Rlimit
impl Unpin for Rlimit
impl UnwindSafe for Rlimit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more