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

Method complete

atomic-core/src/pristine/file_index_v2.rs:117–147  ·  view source on GitHub ↗
(
        device: u64,
        inode: u64,
        mtime: FileIndexTimestamp,
        ctime: FileIndexTimestamp,
        size: u64,
        content_id: Hash,
        canonical_mode: u16,
        canon

Source from the content-addressed store, hash-verified

115impl FileIndexV2Entry {
116 #[allow(clippy::too_many_arguments)]
117 pub fn complete(
118 device: u64,
119 inode: u64,
120 mtime: FileIndexTimestamp,
121 ctime: FileIndexTimestamp,
122 size: u64,
123 content_id: Hash,
124 canonical_mode: u16,
125 canonical_kind: InodeKind,
126 racy_after: FileIndexTimestamp,
127 conversion_policy: Hash,
128 ) -> PristineResult<Self> {
129 if canonical_mode > 0o777 {
130 return Err(codec_error(format!(
131 "FILE_INDEX_V2 canonical mode {canonical_mode:#o} contains unsupported bits"
132 )));
133 }
134 Ok(Self {
135 fields: FileIndexV2Fields::ALL,
136 device: Some(device),
137 inode: Some(inode),
138 mtime: Some(mtime),
139 ctime: Some(ctime),
140 size: Some(size),
141 content_id: Some(content_id),
142 canonical_mode: Some(canonical_mode),
143 canonical_kind: Some(canonical_kind),
144 racy_after: Some(racy_after),
145 conversion_policy: Some(conversion_policy),
146 })
147 }
148
149 pub fn is_complete(&self) -> bool {
150 self.fields == FileIndexV2Fields::ALL

Callers 1

mainFunction · 0.80

Calls 1

codec_errorFunction · 0.70

Tested by

no test coverage detected