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

Method new

atomic-core/src/output/crdt.rs:87–94  ·  view source on GitHub ↗

Creates a new token.

(id: LeafId, kind: TokenKind, content: Vec<u8>, state: LeafState)

Source from the content-addressed store, hash-verified

85impl Token {
86 /// Creates a new token.
87 pub fn new(id: LeafId, kind: TokenKind, content: Vec<u8>, state: LeafState) -> Self {
88 Self {
89 id,
90 kind,
91 content,
92 state,
93 }
94 }
95
96 /// Returns the token content as a string (lossy UTF-8 conversion).
97 pub fn content_str(&self) -> String {

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected