Skip to main content

brows3r_lib/s3/
mod.rs

1//! S3 client pool and per-(profile, region) client management.
2//!
3//! The canonical entry point for any module that needs to call S3 is
4//! `ClientPool::get_or_build(profile_id, region)`.  All AWS SDK calls must go
5//! through clients vended by this pool — never construct an `aws_sdk_s3::Client`
6//! directly outside this module.
7
8pub mod client;
9pub mod cross_account;
10pub mod inspector;
11pub mod list;
12pub mod metadata;
13pub mod multipart;
14pub mod object;
15pub mod presign;
16pub mod tags;
17
18pub use client::{ClientPool, ProxyConfig};
19
20use std::sync::Arc;
21
22// ---------------------------------------------------------------------------
23// S3ClientPoolHandle — Tauri managed state
24// ---------------------------------------------------------------------------
25
26/// Newtype around `Arc<ClientPool>` used as Tauri managed state.
27///
28/// Commands receive `tauri::State<S3ClientPoolHandle>`.
29#[derive(Clone)]
30pub struct S3ClientPoolHandle {
31    pub inner: Arc<ClientPool>,
32}
33
34impl S3ClientPoolHandle {
35    pub fn new(pool: ClientPool) -> Self {
36        Self {
37            inner: Arc::new(pool),
38        }
39    }
40}