fn update(
        &self,
        context: &BuildContext<Self::Buildpack>,
        layer_data: &LayerData<Self::Metadata>,
    ) -> Result<LayerResult<Self::Metadata>, <Self::Buildpack as Buildpack>::Error> {
        LayerResultBuilder::new(layer_data.content_metadata.metadata.clone())
            .env(layer_data.env.clone())
            .build()
    }
/// Updates the layer contents and metadata based on the cached version of a previous run.
///
/// `layer_path` will be a directory with the data from a previous run. This method can modify
/// the contents freely. Layer metadata, including environment variables, is part of the return
/// value of this function and will be written to the appropriate locations by libcnb
/// automatically.
///
/// The return value of this method is the canonical value for metadata and environment variables.
/// If the returned [`LayerResult`](LayerResult) does not contain metadata or environment
/// variables, the resulting layer will not have either. To keep the values from the cached
/// version they must be explicitly added to the result. This can be done by reading the env
/// data from the given [`LayerData`](LayerData) value.
///
/// The default implementation will copy both the previous metadata and environment and not
/// change the layer data itself, making the default implementation a no-op.
///
/// # Implementation Requirements
/// Implementations **MUST NOT** write to any other location than `layer_path`.
Updates the layer contents and metadata based on the cached version of a previous run.
`layer_path` will be a directory with the data from a previous run. This method can modify
the contents freely. Layer metadata, including environment variables, is part of the return
value of this function and will be written to the appropriate locations by libcnb
automatically.

The return value of this method is the canonical value for metadata and environment variables.
If the returned [`LayerResult`](LayerResult) does not contain metadata or environment
variables, the resulting layer will not have either. To keep the values from the cached
version they must be explicitly added to the result. This can be done by reading the env
data from the given [`LayerData`](LayerData) value.

The default implementation will copy both the previous metadata and environment and not
change the layer data itself, making the default implementation a no-op.
Updates the layer contents and metadata based on the cached version of a previous run . ` layer_path ` will be a directory with the data from a previous run . This method can modify the contents freely . Layer metadata including environment variables is part of the return value of this function and will be written to the appropriate locations by libcnb automatically . The return value of this method is the canonical value for metadata and environment variables . If the returned [ ` LayerResult ` ] ( LayerResult ) does not contain metadata or environment variables the resulting layer will not have either . To keep the values from the cached version they must be explicitly added to the result . This can be done by reading the env data from the given [ ` LayerData ` ] ( LayerData ) value . The default implementation will copy both the previous metadata and environment and not change the layer data itself making the default implementation a no - op .
fn update(
        &self,
        context: &BuildContext<Self::Buildpack>,
        layer_data: &LayerData<Self::Metadata>,
    ) -> Result<LayerResult<Self::Metadata>, <Self::Buildpack as Buildpack>::Error> {
        LayerResultBuilder::new(layer_data.content_metadata.metadata.clone())
            .env(layer_data.env.clone())
            .build()
    }
fn update ( & self , context : & BuildContext < Self :: Buildpack > , layer_data : & LayerData < Self :: Metadata > , ) -> Result < LayerResult < Self :: Metadata > , < Self :: Buildpack as Buildpack > :: Error > { LayerResultBuilder :: new ( layer_data . content_metadata . metadata . clone ( ) ) . env ( layer_data . env . clone ( ) ) . build ( ) }
Updates the layer contents and metadata based on the cached version of a previous run.
Updates the layer contents and metadata based on the cached version of a previous run .
&self
context
&BuildContext<Self::Buildpack>
layer_data
&LayerData<Self::Metadata>
&self
context
&BuildContext<Self::Buildpack>
layer_data
&LayerData<Self::Metadata>
implementation requirements
Implementations **MUST NOT** write to any other location than `layer_path`.
Implementations ** MUST NOT ** write to any other location than ` layer_path ` .