Render an indexed root when its creating change is visible.
(&self, inode: Inode)
| 1189 | |
| 1190 | /// Render an indexed root when its creating change is visible. |
| 1191 | pub fn render_if_visible(&self, inode: Inode) -> Result<Option<Vec<u8>>> { |
| 1192 | let Some(root) = self.txn.span_root(inode)? else { |
| 1193 | return Ok(None); |
| 1194 | }; |
| 1195 | if !self.visible.contains(NodeId::new(root[0])) { |
| 1196 | return Ok(None); |
| 1197 | } |
| 1198 | self.render(inode).map(Some) |
| 1199 | } |
| 1200 | |
| 1201 | /// Obtain byte-to-span mappings under this exact view closure. |
| 1202 | pub fn record_state(&self, inode: Inode) -> Result<Option<SpanRecordState>> { |
no test coverage detected