MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / get_set_id_index

Method get_set_id_index

atomic-core/src/pristine/txn/read.rs:147–161  ·  view source on GitHub ↗
(
        &self,
        view_id: u64,
    )

Source from the content-addressed store, hash-verified

145
146impl SetIdIndexTxnT for ReadTxn {
147 fn get_set_id_index(
148 &self,
149 view_id: u64,
150 ) -> PristineResult<Option<crate::pristine::SetIdIndexEntry>> {
151 let table = match self.txn.open_table(VIEW_SET_ID_INDEX) {
152 Ok(table) => table,
153 Err(redb::TableError::TableDoesNotExist(_)) => return Ok(None),
154 Err(error) => return Err(error.into()),
155 };
156 let result = match table.get(view_id)? {
157 Some(value) => decode_set_id_index_entry(value.value()).map(Some),
158 None => Ok(None),
159 };
160 result
161 }
162}
163
164impl CapabilityTxnT for ReadTxn {

Calls 3

valueMethod · 0.80
getMethod · 0.65