pub fn key_id(&self) -> Result<&[u8], KeyPackageError> {
        if let Some(key_id_ext) = self.extension_with_type(ExtensionType::KeyId) {
            return Ok(key_id_ext.as_key_id_extension()?.as_slice());
        }
        Err(KeyPackageError::ExtensionError(
            ExtensionError::InvalidExtensionType("Tried to get a key ID extension".into()),
        ))
    }
/// Get the ID of this key package as byte slice.
/// Returns an error if no Key ID extension is present.
Get the ID of this key package as byte slice.
Returns an error if no Key ID extension is present.
Get the ID of this key package as byte slice . Returns an error if no Key ID extension is present .
pub fn key_id(&self) -> Result<&[u8], KeyPackageError> {
        if let Some(key_id_ext) = self.extension_with_type(ExtensionType::KeyId) {
            return Ok(key_id_ext.as_key_id_extension()?.as_slice());
        }
        Err(KeyPackageError::ExtensionError(
            ExtensionError::InvalidExtensionType("Tried to get a key ID extension".into()),
        ))
    }
pub fn key_id ( & self ) -> Result < & [ u8 ] , KeyPackageError > { if let Some ( key_id_ext ) = self . extension_with_type ( ExtensionType :: KeyId ) { return Ok ( key_id_ext . as_key_id_extension ( ) ? . as_slice ( ) ) ; } Err ( KeyPackageError :: ExtensionError ( ExtensionError :: InvalidExtensionType ( " " . into ( ) ) , ) ) }
Get the ID of this key package as byte slice.
Get the ID of this key package as byte slice .
&self
&self