MCPcopy Create free account
hub / github.com/LEXUGE/dcompass / new

Method new

droute/src/cache.rs:86–92  ·  view source on GitHub ↗
(content: T, ttl: Duration)

Source from the content-addressed store, hash-verified

84
85impl<T: Clone> CacheRecord<T> {
86 pub fn new(content: T, ttl: Duration) -> Self {
87 Self {
88 created_instant: Instant::now(),
89 content,
90 ttl,
91 }
92 }
93
94 pub fn get(&self) -> T {
95 self.content.clone()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected