pub struct S3State {
pub account_id: String,
pub region: String,
pub buckets: BTreeMap<String, S3Bucket>,
pub notification_events: Vec<S3NotificationEvent>,
pub body_cache: Option<Arc<BodyCache>>,
pub object_lambda_responses: BTreeMap<String, ObjectLambdaResponse>,
pub access_points: BTreeMap<String, S3AccessPoint>,
}Fields§
§account_id: String§region: String§buckets: BTreeMap<String, S3Bucket>§notification_events: Vec<S3NotificationEvent>§body_cache: Option<Arc<BodyCache>>§object_lambda_responses: BTreeMap<String, ObjectLambdaResponse>Object Lambda responses keyed by request token.
access_points: BTreeMap<String, S3AccessPoint>Implementations§
Source§impl S3State
impl S3State
pub fn new(account_id: &str, region: &str) -> Self
pub fn set_body_cache(&mut self, cache: Arc<BodyCache>)
pub fn reset(&mut self)
Sourcepub fn read_body_uncached(body: &BodyRef) -> Result<Bytes>
pub fn read_body_uncached(body: &BodyRef) -> Result<Bytes>
Read the full body referenced by a BodyRef without touching the
BodyCache or any S3State. Because it borrows nothing from state,
callers can read part bodies after dropping the global S3 lock — used by
CompleteMultipartUpload to assemble a multi-GB object off-lock instead of
serializing every other S3 operation behind the assembly (bug-audit
2026-05-28, 4.7). Disk bodies are read straight from their path.
Sourcepub fn read_body_range(
&self,
body: &BodyRef,
offset: u64,
len: u64,
) -> Result<Bytes>
pub fn read_body_range( &self, body: &BodyRef, offset: u64, len: u64, ) -> Result<Bytes>
Read a byte range from the body without loading the full object into memory. Memory bodies are sliced directly; disk bodies are seek+read’d. Ranges bypass the body cache (the cache stores whole objects only).
Trait Implementations§
Source§impl AccountState for S3State
impl AccountState for S3State
Source§fn new_for_account(account_id: &str, region: &str, _endpoint: &str) -> Self
fn new_for_account(account_id: &str, region: &str, _endpoint: &str) -> Self
Create a fresh, empty state for the given account.
Source§fn inherit_from(&mut self, sibling: &Self)
fn inherit_from(&mut self, sibling: &Self)
Called after a new account state is created via
MultiAccountState::get_or_create,
with a reference to an existing sibling state. Services can override
this to propagate shared resources (e.g. body caches) to the new state.Auto Trait Implementations§
impl !RefUnwindSafe for S3State
impl !UnwindSafe for S3State
impl Freeze for S3State
impl Send for S3State
impl Sync for S3State
impl Unpin for S3State
impl UnsafeUnpin for S3State
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more