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

Method state_short

atomic-repository/src/repository/views.rs:28–35  ·  view source on GitHub ↗

Get a short version of the Merkle state (first 12 characters).

(&self)

Source from the content-addressed store, hash-verified

26
27 /// Get a short version of the Merkle state (first 12 characters).
28 pub fn state_short(&self) -> String {
29 let full = self.state.to_base32();
30 if full.len() > 12 {
31 full[..12].to_string()
32 } else {
33 full
34 }
35 }
36
37 /// Check if the view is empty (has no changes).
38 pub fn is_empty(&self) -> bool {

Callers 1

Calls 2

to_base32Method · 0.45
lenMethod · 0.45

Tested by 1