Skip to main content

validate_safe_namespaces

Function validate_safe_namespaces 

Source
pub(super) fn validate_safe_namespaces<T: ContentNamespace>(
    header: &Header,
    expected_object_namespace: SafeObjectNamespace,
    expected_content_namespace: T,
) -> Result<(), ExtractionError>
Expand description

Validates the provided header contains the expected object and content namespace. For backward compatibility, missing values are OK, but incorrect values are not. The validation happens individually for both namespace layers, and either one missing with the other being present is OK.