pub struct MemoryPolicy { /* private fields */ }Implementations§
Source§impl MemoryPolicy
impl MemoryPolicy
pub fn new(limit_bytes: Option<u64>, spill_policy: SpillPolicy) -> Self
pub fn limit_bytes(&self) -> Option<u64>
pub fn spill_policy(&self) -> &SpillPolicy
pub fn with_metrics(self, metrics: Arc<dyn SpillMetricsSink>) -> Self
pub fn spill_directory(&self) -> Option<&Path>
pub fn record_spill(&self, bytes: u64, files: u64)
pub fn over_limit(&self, used_bytes: u64) -> bool
pub fn enforce(&self, used_bytes: u64) -> Result<()>
Trait Implementations§
Source§impl Clone for MemoryPolicy
impl Clone for MemoryPolicy
Source§fn clone(&self) -> MemoryPolicy
fn clone(&self) -> MemoryPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MemoryPolicy
impl !RefUnwindSafe for MemoryPolicy
impl Send for MemoryPolicy
impl Sync for MemoryPolicy
impl Unpin for MemoryPolicy
impl !UnwindSafe for MemoryPolicy
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