pub struct ResourceLimits {
pub max_memory_mb: Option<usize>,
pub max_cpu_percent: Option<f64>,
pub max_queue_size: Option<usize>,
pub max_task_duration: Option<Duration>,
}Expand description
Resource limits for the runtime
Fields§
§max_memory_mb: Option<usize>§max_cpu_percent: Option<f64>§max_queue_size: Option<usize>§max_task_duration: Option<Duration>Implementations§
Source§impl ResourceLimits
impl ResourceLimits
pub fn is_queue_size_exceeded(&self, queue_size: usize) -> bool
pub fn is_task_duration_exceeded(&self, duration: Duration) -> bool
Trait Implementations§
Source§impl Clone for ResourceLimits
impl Clone for ResourceLimits
Source§fn clone(&self) -> ResourceLimits
fn clone(&self) -> ResourceLimits
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceLimits
impl Debug for ResourceLimits
Auto Trait Implementations§
impl Freeze for ResourceLimits
impl RefUnwindSafe for ResourceLimits
impl Send for ResourceLimits
impl Sync for ResourceLimits
impl Unpin for ResourceLimits
impl UnwindSafe for ResourceLimits
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)