[−][src]Struct limits_rs::Limits
A structure containing all possible properties that can be limited by a GNU/Linux operating system.
Fields
max_cpu_time: Limit
max_file_size: Limit
max_data_size: Limit
max_stack_size: Limit
max_core_file_size: Limit
max_resident_set: Limit
max_processes: Limit
max_open_files: Limit
max_locked_memory: Limit
max_address_space: Limit
max_file_locks: Limit
max_pending_signals: Limit
max_msgqueue_size: Limit
max_nice_priority: Limit
max_realtime_priority: Limit
max_realtime_timeout: Limit
Methods
impl Limits
[src]
pub fn set_property_from_strings(
&mut self,
name: &str,
soft_string: &str,
hard_string: &str
)
[src]
&mut self,
name: &str,
soft_string: &str,
hard_string: &str
)
Set properties on a Limit
structure, as read from strings.
Examples
use limits_rs::{Limit, Limits}; // Create a new limits structure let mut limits = Limits::default(); // Trying to set a non-existing property should do nothing limits.set_property_from_strings("Does_not_exist", "123", "456"); assert_eq!(limits, Limits::default()); // Let's set a limit for a existing property and assert that the limit is actually stored in // the structure limits.set_property_from_strings("Max file locks", "123", "456"); assert_eq!(limits.max_file_locks, Limit { soft: Some(123), hard: Some(456) })
Trait Implementations
impl Debug for Limits
[src]
impl Default for Limits
[src]
impl Eq for Limits
[src]
impl PartialEq<Limits> for Limits
[src]
impl StructuralEq for Limits
[src]
impl StructuralPartialEq for Limits
[src]
Auto Trait Implementations
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnwindSafe for Limits
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
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>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,