Render `inode` through the shared context when its span root is visible; `None` means the file is graph-origin and must be read from the graph.
(
&self,
inode: Inode,
)
| 1134 | /// visible; `None` means the file is graph-origin and must be read from |
| 1135 | /// the graph. |
| 1136 | pub(super) fn render_if_present( |
| 1137 | &self, |
| 1138 | inode: Inode, |
| 1139 | ) -> Result<Option<Vec<u8>>, RepositoryError> { |
| 1140 | if !has_visible_span_root(self.txn, self.store, inode, self.visibility)? { |
| 1141 | return Ok(None); |
| 1142 | } |
| 1143 | self.context()? |
| 1144 | .render(inode) |
| 1145 | .map(Some) |
| 1146 | .map_err(|error| RepositoryError::Database(error.to_string())) |
| 1147 | } |
| 1148 | |
| 1149 | /// Build the context on the calling thread when any of `inodes` is |
| 1150 | /// span-rooted on this view, so that a parallel walk over them shares one |