MCPcopy Create free account
hub / github.com/cosdata/cosdata / new

Method new

src/models/chunked_list.rs:39–47  ·  view source on GitHub ↗
(item: T)

Source from the content-addressed store, hash-verified

37
38impl<T: Clone> LazyItemRef<T> {
39 pub fn new(item: T) -> Self {
40 LazyItemRef {
41 item: Arc::new(RwLock::new(LazyItem {
42 data: Some(Arc::new(RwLock::new(item))),
43 offset: None,
44 decay_counter: 0,
45 })),
46 }
47 }
48
49 pub fn new_with_lock(item: Item<T>) -> Self {
50 LazyItemRef {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected