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

Method try_extract

atomic-core/src/diff/inline.rs:289–291  ·  view source on GitHub ↗

Safely extract the content, returning None if out of bounds.

(&self, content: &'a [u8])

Source from the content-addressed store, hash-verified

287
288 /// Safely extract the content, returning None if out of bounds.
289 pub fn try_extract<'a>(&self, content: &'a [u8]) -> Option<&'a [u8]> {
290 content.get(self.start..self.end)
291 }
292}
293
294impl std::fmt::Display for ChangeHunk {

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected