(
txn: &T,
store: &C,
inode: Inode,
visibility: &GraphVisibilityClosure,
)
| 1068 | } |
| 1069 | |
| 1070 | pub(super) fn retrieve_span_if_present<T, C>( |
| 1071 | txn: &T, |
| 1072 | store: &C, |
| 1073 | inode: Inode, |
| 1074 | visibility: &GraphVisibilityClosure, |
| 1075 | ) -> Result<Option<Vec<u8>>, RepositoryError> |
| 1076 | where |
| 1077 | T: atomic_core::pristine::span_patch_storage::SpanPatchReadTxn |
| 1078 | + atomic_core::pristine::TreeTxnT |
| 1079 | + atomic_core::pristine::CapabilityTxnT, |
| 1080 | C: atomic_core::change::ChangeStore, |
| 1081 | { |
| 1082 | if !has_visible_span_root(txn, store, inode, visibility)? { |
| 1083 | return Ok(None); |
| 1084 | } |
| 1085 | atomic_core::pristine::span_patch_storage::SpanRenderContext::new(txn, store, visibility) |
| 1086 | .and_then(|context| context.render(inode)) |
| 1087 | .map(Some) |
| 1088 | .map_err(|error| RepositoryError::Database(error.to_string())) |
| 1089 | } |
| 1090 | |
| 1091 | /// One span render context shared by every file read through a single |
| 1092 | /// transaction and visibility closure. `retrieve_span_if_present` builds a |
no test coverage detected