craft_parts.overlays.layers module¶
Layer management and helpers.
- class craft_parts.overlays.layers.LayerHash(layer_hash)¶
Bases:
objectThe layer validation hash for a part.
- Parameters:
layer_hash (
bytes)
- classmethod for_part(part, *, previous_layer_hash)¶
Obtain the validation hash for a part.
- hex()¶
Return the current hash value as a hexadecimal string.
- Return type:
str
- classmethod load(part)¶
Read the part layer validation hash from persistent state.
- class craft_parts.overlays.layers.LayerStateManager(part_list, base_layer_hash)¶
Bases:
objectAn in-memory layer state management helper for action planning.
- Parameters:
- compute_layer_hash(part)¶
Calculate the layer validation hash for the given part.
- get_layer_hash(part)¶
Obtain the layer hash for the given part.
- get_overlay_hash()¶
Obtain the overlay validation hash.
- Return type:
bytes