(
txn: &T,
store: &C,
inode: Inode,
visibility: &GraphVisibilityClosure,
)
| 1214 | } |
| 1215 | |
| 1216 | pub(super) fn retrieve_span_if_present<T, C>( |
| 1217 | txn: &T, |
| 1218 | store: &C, |
| 1219 | inode: Inode, |
| 1220 | visibility: &GraphVisibilityClosure, |
| 1221 | ) -> Result<Option<Vec<u8>>, RepositoryError> |
| 1222 | where |
| 1223 | T: atomic_core::pristine::span_patch_storage::SpanPatchReadTxn |
| 1224 | + atomic_core::pristine::TreeTxnT |
| 1225 | + atomic_core::pristine::CapabilityTxnT, |
| 1226 | C: atomic_core::change::ChangeStore, |
| 1227 | { |
| 1228 | if !has_visible_span_root(txn, store, inode, visibility)? { |
| 1229 | return Ok(None); |
| 1230 | } |
| 1231 | atomic_core::pristine::span_patch_storage::SpanRenderContext::new(txn, store, visibility) |
| 1232 | .and_then(|context| context.render_if_visible(inode)) |
| 1233 | .map_err(|error| RepositoryError::Database(error.to_string())) |
| 1234 | } |
| 1235 | |
| 1236 | /// One span render context shared by every file read through a single |
| 1237 | /// transaction and visibility closure. `retrieve_span_if_present` builds a |
no test coverage detected