MCPcopy Create free account
hub / github.com/elastic/devfiler / default

Method default

src/ui/cached.rs:50–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48
49impl<V: Default> Default for Cached<V> {
50 fn default() -> Self {
51 Self(Arc::new(CachedInner {
52 max_lifetime: Duration::try_seconds(1).unwrap(),
53 being_constructed: AtomicBool::new(false),
54 value: ArcSwap::new(Arc::new(CachedValue {
55 created: DateTime::UNIX_EPOCH,
56 input_hash: 0,
57 value: V::default(),
58 })),
59 }))
60 }
61}
62
63impl<V: Default> Cached<V> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected