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

Method has_contents

atomic-core/src/change/store.rs:156–160  ·  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

154 ///
155 /// `true` if the change exists and has non-empty content.
156 fn has_contents(&self, hash: &Hash) -> bool {
157 self.get_change(hash)
158 .map(|c| !c.contents.is_empty())
159 .unwrap_or(false)
160 }
161
162 /// Read content bytes for a span.
163 ///

Callers

nothing calls this directly

Implementers 3

build_tests.rsatomic-core/src/pristine/span_patch_st
verified.rsatomic-core/src/change/verified.rs
store.rsatomic-core/src/change/store.rs

Calls 2

get_changeMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected