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

Method render_if_visible

atomic-core/src/pristine/span_patch_storage.rs:1191–1199  ·  view source on GitHub ↗

Render an indexed root when its creating change is visible.

(&self, inode: Inode)

Source from the content-addressed store, hash-verified

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>> {

Callers 2

status_innerMethod · 0.80

Calls 3

span_rootMethod · 0.45
containsMethod · 0.45
renderMethod · 0.45

Tested by

no test coverage detected