fn migrate_incompatible_metadata(
        &self,
        context: &BuildContext<Self::Buildpack>,
        metadata: &GenericMetadata,
    ) -> Result<MetadataMigration<Self::Metadata>, <Self::Buildpack as Buildpack>::Error> {
        Ok(MetadataMigration::RecreateLayer)
    }
/// This method will be called by libcnb when parsing of the layer's metadata into
/// [`Self::Metadata`] failed. The result of this method call determines which strategy libcnb
/// should use to continue.
///
/// The simplest strategy, [`MetadataMigration::RecreateLayer`] will delete the layer and
/// recreate it from scratch. This is also the default implementation.
///
/// In some cases, a layer might be able to migrate metadata from an older version to a new
/// structure. For this, [`MetadataMigration::ReplaceMetadata`] can be used. Implementations can
/// use the raw TOML metadata passed as `metadata` to the method and the contents of the layer
/// to construct a new value for [`Self::Metadata`].
///
/// # Implementation Requirements
/// Implementations **MUST** be read-only. They **MUST NOT** modify the file-system or write
/// anything to stdout/stdout or any other stream.
This method will be called by libcnb when parsing of the layer's metadata into
[`Self::Metadata`] failed. The result of this method call determines which strategy libcnb
should use to continue.

The simplest strategy, [`MetadataMigration::RecreateLayer`] will delete the layer and
recreate it from scratch. This is also the default implementation.

In some cases, a layer might be able to migrate metadata from an older version to a new
structure.
This method will be called by libcnb when parsing of the layer ' s metadata into [ ` Self :: Metadata ` ] failed . The result of this method call determines which strategy libcnb should use to continue . The simplest strategy [ ` MetadataMigration :: RecreateLayer ` ] will delete the layer and recreate it from scratch . This is also the default implementation . In some cases a layer might be able to migrate metadata from an older version to a new structure .
fn migrate_incompatible_metadata(
        &self,
        context: &BuildContext<Self::Buildpack>,
        metadata: &GenericMetadata,
    ) -> Result<MetadataMigration<Self::Metadata>, <Self::Buildpack as Buildpack>::Error> {
        Ok(MetadataMigration::RecreateLayer)
    }
fn migrate_incompatible_metadata ( & self , context : & BuildContext < Self :: Buildpack > , metadata : & GenericMetadata , ) -> Result < MetadataMigration < Self :: Metadata > , < Self :: Buildpack as Buildpack > :: Error > { Ok ( MetadataMigration :: RecreateLayer ) }
This method will be called by libcnb when parsing of the layer's metadata into
[`Self::Metadata`] failed.
This method will be called by libcnb when parsing of the layer ' s metadata into [ ` Self :: Metadata ` ] failed .
&self
context
&BuildContext<Self::Buildpack>
metadata
&GenericMetadata
&self
context
&BuildContext<Self::Buildpack>
metadata
&GenericMetadata
implementation requirements
Implementations **MUST** be read-only. They **MUST NOT** modify the file-system or write
anything to stdout/stdout or any other stream.
Implementations ** MUST ** be read - only . They ** MUST NOT ** modify the file - system or write anything to stdout / stdout or any other stream .