use config::s3::S3Config; use storage::S3Client; use crate::error::ExportError; pub struct AppStorage { config: S3Config, client: S3Client, } impl AppStorage { pub fn connect(config: S3Config) -> Result { let client = S3Client::new(&config).map_err(ExportError::from)?; Ok(Self { config, client }) } pub fn config(&self) -> &S3Config { &self.config } pub fn client(&self) -> &S3Client { &self.client } }