Skip to main content

merge_components_into_mutable_metadata

Function merge_components_into_mutable_metadata 

pub fn merge_components_into_mutable_metadata<'a>(
    base: &mut GroupMutableMetadata,
    component: impl Fn(ComponentId) -> Option<&'a [u8]>,
) -> Result<(), GroupMutableMetadataError>
Expand description

Overlay metadata components onto base, reading each component’s bytes with component. Values translate as in merge_dict_into_mutable_metadata.

Borrowing the bytes lets a caller merge values it computed, such as the post-commit state, without copying them into an OpenMLS dictionary that would free the commit-log signer unwiped.