pub struct MemoryOptions {
pub policy_name: &'static str,
pub budget: MemoryBudget,
pub domains: MemoryDomainBudgets,
pub events: MemoryEventPolicy,
pub default_image_cache_policy: ImageCachePolicy,
pub persistent_cache_enabled: bool,
}Fields§
§policy_name: &'static str§budget: MemoryBudget§domains: MemoryDomainBudgets§events: MemoryEventPolicy§default_image_cache_policy: ImageCachePolicy§persistent_cache_enabled: boolImplementations§
Source§impl MemoryOptions
impl MemoryOptions
pub const fn new( policy_name: &'static str, budget: MemoryBudget, domains: MemoryDomainBudgets, events: MemoryEventPolicy, default_image_cache_policy: ImageCachePolicy, persistent_cache_enabled: bool, ) -> Self
pub const fn unbounded( default_image_cache_policy: ImageCachePolicy, persistent_cache_enabled: bool, ) -> Self
pub const fn persistent_cache(self, enabled: bool) -> Self
pub const fn persistent_budget(self, bytes: u64) -> Self
pub fn validate(self) -> Result<(), &'static str>
pub const fn event_action(self, event: MemoryEvent) -> MemoryAction
pub fn domain_budget(self, domain: CacheDomain) -> usize
Trait Implementations§
Source§impl Clone for MemoryOptions
impl Clone for MemoryOptions
Source§fn clone(&self) -> MemoryOptions
fn clone(&self) -> MemoryOptions
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 moreimpl Copy for MemoryOptions
Source§impl Debug for MemoryOptions
impl Debug for MemoryOptions
impl Eq for MemoryOptions
Source§impl PartialEq for MemoryOptions
impl PartialEq for MemoryOptions
impl StructuralPartialEq for MemoryOptions
Auto Trait Implementations§
impl Freeze for MemoryOptions
impl RefUnwindSafe for MemoryOptions
impl Send for MemoryOptions
impl Sync for MemoryOptions
impl Unpin for MemoryOptions
impl UnsafeUnpin for MemoryOptions
impl UnwindSafe for MemoryOptions
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