@@ -154,43 +154,53 @@ type Timestamp = u64;
154
154
/// The key for a registry index entry stored in the database.
155
155
#[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
156
156
pub struct RegistryIndex {
157
+ /// A unique name of the registry source.
157
158
pub encoded_registry_name : InternedString ,
158
159
}
159
160
160
161
/// The key for a registry `.crate` entry stored in the database.
161
162
#[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
162
163
pub struct RegistryCrate {
164
+ /// A unique name of the registry source.
163
165
pub encoded_registry_name : InternedString ,
166
+ /// The filename of the compressed crate, like `foo-1.2.3.crate`.
164
167
pub crate_filename : InternedString ,
168
+ /// The size of the `.crate` file.
165
169
pub size : u64 ,
166
170
}
167
171
168
172
/// The key for a registry src directory entry stored in the database.
169
173
#[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
170
174
pub struct RegistrySrc {
175
+ /// A unique name of the registry source.
171
176
pub encoded_registry_name : InternedString ,
177
+ /// The directory name of the extracted source, like `foo-1.2.3`.
172
178
pub package_dir : InternedString ,
173
- // Total size of the src directory in bytes.
174
- //
175
- // This can be None when the size is unknown. For example, when the src
176
- // directory already exists on disk, and we just want to update the
177
- // last-use timestamp. We don't want to take the expense of computing disk
178
- // usage unless necessary. `populate_untracked_src` will handle any actual
179
- // NULL values in the database, which can happen when the src directory is
180
- // created by an older version of cargo that did not track sizes.
179
+ /// Total size of the src directory in bytes.
180
+ ///
181
+ /// This can be None when the size is unknown. For example, when the src
182
+ /// directory already exists on disk, and we just want to update the
183
+ /// last-use timestamp. We don't want to take the expense of computing disk
184
+ /// usage unless necessary. [`GlobalCacheTracker::populate_untracked`]
185
+ /// will handle any actual NULL values in the database, which can happen
186
+ /// when the src directory is created by an older version of cargo that
187
+ /// did not track sizes.
181
188
pub size : Option < u64 > ,
182
189
}
183
190
184
191
/// The key for a git db entry stored in the database.
185
192
#[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
186
193
pub struct GitDb {
194
+ /// A unique name of the git database.
187
195
pub encoded_git_name : InternedString ,
188
196
}
189
197
190
198
/// The key for a git checkout entry stored in the database.
191
199
#[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
192
200
pub struct GitCheckout {
201
+ /// A unique name of the git database.
193
202
pub encoded_git_name : InternedString ,
203
+ /// A unique name of the checkout without the database.
194
204
pub short_name : InternedString ,
195
205
/// Total size of the checkout directory.
196
206
///
0 commit comments