pub(crate) trait KeyUsageSliceHelper {
// Required methods
fn usage_intersection(&self, other: &[KeyUsage]) -> Vec<KeyUsage>;
fn normalized_value(&self) -> Vec<KeyUsage>;
fn ensure_only_contain_entries_from(
&self,
allowed: &[KeyUsage],
) -> ErrorResult;
}Expand description
The trait providing helper functions for &[KeyUsage]
Required Methods§
Sourcefn usage_intersection(&self, other: &[KeyUsage]) -> Vec<KeyUsage>
fn usage_intersection(&self, other: &[KeyUsage]) -> Vec<KeyUsage>
Sourcefn normalized_value(&self) -> Vec<KeyUsage>
fn normalized_value(&self) -> Vec<KeyUsage>
Sourcefn ensure_only_contain_entries_from(&self, allowed: &[KeyUsage]) -> ErrorResult
fn ensure_only_contain_entries_from(&self, allowed: &[KeyUsage]) -> ErrorResult
Ensure that the key usage list only contains entries which are in allowed. If the key
usage list contains an entry which is not in allowed, then throw a SyntaxError. Note that,
if allowed is set to empty, it throws a SyntaxError when the key usage list is not empty.