pub struct MemoryGovernor { /* private fields */ }Implementations§
Source§impl MemoryGovernor
impl MemoryGovernor
pub fn new(options: MemoryOptions) -> Self
pub fn options(&self) -> MemoryOptions
pub fn set_options(&self, options: MemoryOptions)
pub fn next_instance_id(&self) -> DomainInstanceId
pub fn register(&self, registration: DomainRegistration) -> CacheRegistration
pub fn snapshot(&self) -> MemorySnapshot
pub fn trim( &self, reason: TrimReason, scope: CacheScope, target_bytes: usize, ) -> usize
pub fn invalidate_domain(&self, domain: CacheDomain) -> usize
pub fn notify(&self, event: MemoryEvent)
pub fn try_reserve(&self, bytes: usize) -> Option<MemoryReservation>
pub fn try_reserve_task(&self, bytes: usize) -> Option<MemoryTaskReservation>
Trait Implementations§
Source§impl Clone for MemoryGovernor
impl Clone for MemoryGovernor
Source§fn clone(&self) -> MemoryGovernor
fn clone(&self) -> MemoryGovernor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MemoryGovernor
impl RefUnwindSafe for MemoryGovernor
impl Send for MemoryGovernor
impl Sync for MemoryGovernor
impl Unpin for MemoryGovernor
impl UnsafeUnpin for MemoryGovernor
impl UnwindSafe for MemoryGovernor
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