rok-core 0.6.1

Core primitives for the rok ecosystem — errors, crypto, i18n, config, DI, and more
Documentation
#[derive(Debug, Clone)]
pub struct EncryptConfig {
    pub key: String,
    pub old_keys: Vec<String>,
}

impl EncryptConfig {
    pub fn new(key: impl Into<String>) -> Self {
        Self {
            key: key.into(),
            old_keys: Vec::new(),
        }
    }

    pub fn with_old_keys(mut self, old_keys: impl IntoIterator<Item = impl Into<String>>) -> Self {
        self.old_keys = old_keys.into_iter().map(|k| k.into()).collect();
        self
    }
}