pub struct CachePutOpts {
pub content_type: String,
pub ttl_secs: Option<u64>,
pub cost_hint_ms: Option<u32>,
}Expand description
Options accepted by Mnemo::cache_put. Defaults describe an
untyped, never-expiring, non-cost-hinted entry.
Fields§
§content_type: StringFree-form content-type label. Convention: "json", "text",
"bytes", or a MIME string. Not interpreted by the engine —
preserved verbatim on cache_get so callers can round-trip
their own type discipline.
ttl_secs: Option<u64>Time-to-live in seconds from the moment of cache_put. None
means “never expires by itself” (still evictable via LRU or
namespace purge).
cost_hint_ms: Option<u32>Optional hint of how expensive the miss-side computation was, in milliseconds. Recorded per-entry; today used only as a tie-breaker for future cost-aware eviction (see the GDSF follow-up note in the level-up plan).
Trait Implementations§
Source§impl Clone for CachePutOpts
impl Clone for CachePutOpts
Source§impl Debug for CachePutOpts
impl Debug for CachePutOpts
Auto Trait Implementations§
impl Forget for CachePutOpts
impl Freeze for CachePutOpts
impl RefUnwindSafe for CachePutOpts
impl Send for CachePutOpts
impl Sync for CachePutOpts
impl Unpin for CachePutOpts
impl UnsafeUnpin for CachePutOpts
impl UnwindSafe for CachePutOpts
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