pub trait Integration: Sized {
type KeyId: AppendIntegrationKey<Self>;
type PrivateKey;
type Config: IntegrationConfig<Self>;
const NAME: &'static str;
// Required methods
fn parse_key_id(key_id_str: &str) -> Result<Self::KeyId, IntegrationError>;
fn parse_private_key(
private_key_str: impl AsRef<str>,
) -> Result<Self::PrivateKey, IntegrationError>;
fn encrypt_data_key(
key_id: &Self::KeyId,
data_key: &DataKey,
) -> Result<String, IntegrationError>;
fn decrypt_data_key(
key_id: &Self::KeyId,
encrypted_data_key: &str,
) -> Result<Option<DataKey>, IntegrationError>;
fn select_metadata_units(
integration_metadata: &mut IntegrationMetadata,
) -> &mut IntegrationMetadataUnits<Self>;
// Provided methods
fn private_key_env_var_name() -> String { ... }
fn private_key_file_path_override_env_var_name() -> String { ... }
fn private_keys_from_env( ) -> Result<Vec<Self::PrivateKey>, IntegrationError> { ... }
fn private_keys_from_default_key_file( ) -> Result<Vec<Self::PrivateKey>, IntegrationError> { ... }
fn retrieve_private_keys( ) -> Result<Vec<Self::PrivateKey>, IntegrationError> { ... }
}Required Associated Constants§
Required Associated Types§
type KeyId: AppendIntegrationKey<Self>
type PrivateKey
type Config: IntegrationConfig<Self>
Required Methods§
fn parse_key_id(key_id_str: &str) -> Result<Self::KeyId, IntegrationError>
fn parse_private_key( private_key_str: impl AsRef<str>, ) -> Result<Self::PrivateKey, IntegrationError>
fn encrypt_data_key( key_id: &Self::KeyId, data_key: &DataKey, ) -> Result<String, IntegrationError>
fn decrypt_data_key( key_id: &Self::KeyId, encrypted_data_key: &str, ) -> Result<Option<DataKey>, IntegrationError>
fn select_metadata_units( integration_metadata: &mut IntegrationMetadata, ) -> &mut IntegrationMetadataUnits<Self>
Provided Methods§
fn private_key_env_var_name() -> String
fn private_key_file_path_override_env_var_name() -> String
fn private_keys_from_env() -> Result<Vec<Self::PrivateKey>, IntegrationError>
fn private_keys_from_default_key_file() -> Result<Vec<Self::PrivateKey>, IntegrationError>
fn retrieve_private_keys() -> Result<Vec<Self::PrivateKey>, IntegrationError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl Integration for AgeIntegration
Available on crate feature age only.
impl Integration for AgeIntegration
Available on crate feature
age only.