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

Method content

atomic-core/src/merge/mod.rs:89–96  ·  view source on GitHub ↗

Get the content bytes regardless of outcome type. For conflicts, returns the left side (caller should check [`is_conflict`](Self::is_conflict) first). For [`NoCrdtData`](Self::NoCrdtData), returns an empty slice.

(&self)

Source from the content-addressed store, hash-verified

87 /// [`is_conflict`](Self::is_conflict) first). For [`NoCrdtData`](Self::NoCrdtData),
88 /// returns an empty slice.
89 pub fn content(&self) -> &[u8] {
90 match self {
91 Self::Clean(c) => c,
92 Self::AutoMerged { content, .. } => content,
93 Self::Conflict { left, .. } => left,
94 Self::NoCrdtData => &[],
95 }
96 }
97}
98
99#[cfg(test)]

Callers 7

parse_diff_filesFunction · 0.45
get_file_contentFunction · 0.45
tokenizeFunction · 0.45
test_multi_file_workflowFunction · 0.45
demo_multiline_diffFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_multi_file_workflowFunction · 0.36