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

Method tokenize_all

atomic-core/src/record/workflow/crdt/tokenize/mod.rs:89–99  ·  view source on GitHub ↗

Tokenizes all content and returns the result with statistics. This eagerly processes all lines and collects statistics.

(&self)

Source from the content-addressed store, hash-verified

87 ///
88 /// This eagerly processes all lines and collects statistics.
89 pub fn tokenize_all(&self) -> (Vec<TokenizedLine>, TokenStats) {
90 let mut lines = Vec::new();
91 let mut stats = TokenStats::new();
92
93 for line in self.lines() {
94 stats.add_line(&line);
95 lines.push(line);
96 }
97
98 (lines, stats)
99 }
100
101 /// Checks if the content appears to be binary.
102 ///

Calls 3

linesMethod · 0.45
add_lineMethod · 0.45
pushMethod · 0.45