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

Method render

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

Render the visible span tree for an inode.

(&self, inode: Inode)

Source from the content-addressed store, hash-verified

1509
1510 /// Render the visible span tree for an inode.
1511 pub fn render(&self, inode: Inode) -> Result<Vec<u8>> {
1512 if self.txn.span_root(inode)?.is_none() && self.txn.legacy_span_enabled()? {
1513 return Ok(self
1514 .legacy_record_state(inode)?
1515 .context("legacy span baseline missing")?
1516 .content);
1517 }
1518 let (content, oversized) = self.render_internal(inode, None, usize::MAX)?;
1519 ensure!(!oversized, "span render exceeds addressable memory");
1520 Ok(content)
1521 }
1522
1523 /// Render at most `max_bytes`, validating the complete span tree even when
1524 /// the visible file is too large to retain.

Calls 6

is_noneMethod · 0.80
legacy_record_stateMethod · 0.80
render_internalMethod · 0.80
span_rootMethod · 0.45
legacy_span_enabledMethod · 0.45
contextMethod · 0.45