Skip to main content

encode_metadata_attribute_value

Function encode_metadata_attribute_value 

Source
pub fn encode_metadata_attribute_value(
    component_id: ComponentId,
    legacy_value: &str,
) -> Result<Vec<u8>, MigrationError>
Expand description

Translate a legacy GroupMutableMetadata attribute string into the AppData wire bytes for that component.

  • MESSAGE_DISAPPEAR_FROM_NS / MESSAGE_DISAPPEAR_IN_NS: the legacy attribute is a decimal-stringified i64; emit 8 big-endian bytes.
  • String-typed attributes (group name/description/url/app data/min version): emit the raw UTF-8 bytes unchanged.