pub struct ResourcePolicy {
pub keep_loaded: bool,
pub max_memory_mb: Option<usize>,
}Expand description
Configuration policy for resource lifecycle management.
Fields§
§keep_loaded: boolIf true, resources are kept loaded until explicitly unloaded or server shutdown. If false, resources may be evicted based on other policies (e.g., LRU).
max_memory_mb: Option<usize>Optional memory limit in megabytes. When exceeded, least-recently-used resources are evicted until memory usage is below the limit. Only applies when keep_loaded is false.
Trait Implementations§
Source§impl Clone for ResourcePolicy
impl Clone for ResourcePolicy
Source§fn clone(&self) -> ResourcePolicy
fn clone(&self) -> ResourcePolicy
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 moreSource§impl Debug for ResourcePolicy
impl Debug for ResourcePolicy
Auto Trait Implementations§
impl Freeze for ResourcePolicy
impl RefUnwindSafe for ResourcePolicy
impl Send for ResourcePolicy
impl Sync for ResourcePolicy
impl Unpin for ResourcePolicy
impl UnwindSafe for ResourcePolicy
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