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

Method state_short

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

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

(&self)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

to_base32Method · 0.45
lenMethod · 0.45

Tested by 1