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

Method has_contents

atomic-core/src/change/store.rs:132–136  ·  view source on GitHub ↗

Check if a change has content bytes. Some changes may have empty content sections (e.g., metadata-only changes). # Arguments `hash` - The content hash of the change # Returns `true` if the change exists and has non-empty content.

(&self, hash: &Hash)

Source from the content-addressed store, hash-verified

130 ///
131 /// `true` if the change exists and has non-empty content.
132 fn has_contents(&self, hash: &Hash) -> bool {
133 self.get_change(hash)
134 .map(|c| !c.contents.is_empty())
135 .unwrap_or(false)
136 }
137
138 /// Read content bytes for a span.
139 ///

Callers

nothing calls this directly

Implementers 1

store.rsatomic-core/src/change/store.rs

Calls 2

get_changeMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected