File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -192,13 +192,23 @@ pub enum PrepareResult {
192192/// A container image layer with associated downloaded-or-not state.
193193#[ derive( Debug ) ]
194194pub struct ManifestLayerState {
195+ /// The underlying layer descriptor.
195196 pub ( crate ) layer : oci_image:: Descriptor ,
197+ // TODO semver: Make this readonly via an accessor
196198 /// The ostree ref name for this layer.
197199 pub ostree_ref : String ,
200+ // TODO semver: Make this readonly via an accessor
198201 /// The ostree commit that caches this layer, if present.
199202 pub commit : Option < String > ,
200203}
201204
205+ impl ManifestLayerState {
206+ /// Return the layer descriptor.
207+ pub fn layer ( & self ) -> & oci_image:: Descriptor {
208+ & self . layer
209+ }
210+ }
211+
202212/// Information about which layers need to be downloaded.
203213#[ derive( Debug ) ]
204214pub struct PreparedImport {
@@ -274,7 +284,7 @@ impl PreparedImport {
274284 if v. commit . is_some ( ) {
275285 ( stored + 1 , to_fetch, sz)
276286 } else {
277- ( stored, to_fetch + 1 , sz + v. layer . size ( ) )
287+ ( stored, to_fetch + 1 , sz + v. layer ( ) . size ( ) )
278288 }
279289 } ) ;
280290 ( to_fetch > 0 ) . then ( || {
You can’t perform that action at this time.
0 commit comments