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

Method semantic_baseline_id

atomic-core/src/pristine/span_patch_storage.rs:761–770  ·  view source on GitHub ↗

Identity of the semantic baseline. Text includes line/token structure; opaque bytes use a separate domain and retain their authored ranges without inventing text tokens.

(&self)

Source from the content-addressed store, hash-verified

759 /// opaque bytes use a separate domain and retain their authored ranges
760 /// without inventing text tokens.
761 pub fn semantic_baseline_id(&self) -> Result<SpanProjectionId> {
762 if self.content.contains(&0) || std::str::from_utf8(&self.content).is_err() {
763 return projection_id(
764 &self.file,
765 b"opaque",
766 &self.authored_ranges(0..self.content.len())?,
767 );
768 }
769 Ok(self.semantic_snapshot()?.id)
770 }
771
772 /// Derive a portable semantic baseline for validating an edit on a
773 /// receiving repository. Identical visible authored spans produce the

Callers 1

record_binary_span_editFunction · 0.80

Calls 5

projection_idFunction · 0.85
authored_rangesMethod · 0.80
semantic_snapshotMethod · 0.80
containsMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected