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

Method new

atomic-core/src/pristine/file_index_v2.rs:46–56  ·  view source on GitHub ↗
(seconds: i64, nanoseconds: u32)

Source from the content-addressed store, hash-verified

44
45impl FileIndexTimestamp {
46 pub fn new(seconds: i64, nanoseconds: u32) -> PristineResult<Self> {
47 if nanoseconds >= 1_000_000_000 {
48 return Err(codec_error(format!(
49 "FILE_INDEX_V2 timestamp has invalid nanoseconds {nanoseconds}"
50 )));
51 }
52 Ok(Self {
53 seconds,
54 nanoseconds,
55 })
56 }
57}
58
59/// Raw canonical repository path scoped to one persistent working copy.

Callers

nothing calls this directly

Calls 2

validate_pathFunction · 0.85
codec_errorFunction · 0.70

Tested by

no test coverage detected