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

Method state_short

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

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

(&self)

Source from the content-addressed store, hash-verified

35
36 /// Get a short version of the Merkle state (first 12 characters).
37 pub fn state_short(&self) -> String {
38 let full = self.state.to_base32();
39 if full.len() > 12 {
40 full[..12].to_string()
41 } else {
42 full
43 }
44 }
45
46 /// Check if the view is empty (has no changes).
47 pub fn is_empty(&self) -> bool {

Callers 1

Calls 2

to_base32Method · 0.45
lenMethod · 0.45

Tested by 1