@@ -154,43 +154,53 @@ type Timestamp = u64;
154154/// The key for a registry index entry stored in the database.
155155#[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
156156pub struct RegistryIndex {
157+ /// A unique name of the registry source.
157158 pub encoded_registry_name : InternedString ,
158159}
159160
160161/// The key for a registry `.crate` entry stored in the database.
161162#[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
162163pub struct RegistryCrate {
164+ /// A unique name of the registry source.
163165 pub encoded_registry_name : InternedString ,
166+ /// The filename of the compressed crate, like `foo-1.2.3.crate`.
164167 pub crate_filename : InternedString ,
168+ /// The size of the `.crate` file.
165169 pub size : u64 ,
166170}
167171
168172/// The key for a registry src directory entry stored in the database.
169173#[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
170174pub struct RegistrySrc {
175+ /// A unique name of the registry source.
171176 pub encoded_registry_name : InternedString ,
177+ /// The directory name of the extracted source, like `foo-1.2.3`.
172178 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.
181188 pub size : Option < u64 > ,
182189}
183190
184191/// The key for a git db entry stored in the database.
185192#[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
186193pub struct GitDb {
194+ /// A unique name of the git database.
187195 pub encoded_git_name : InternedString ,
188196}
189197
190198/// The key for a git checkout entry stored in the database.
191199#[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
192200pub struct GitCheckout {
201+ /// A unique name of the git database.
193202 pub encoded_git_name : InternedString ,
203+ /// A unique name of the checkout without the database.
194204 pub short_name : InternedString ,
195205 /// Total size of the checkout directory.
196206 ///
0 commit comments