pub struct S3Helpers {}
Expand description
Helper utilities for S3 operations. Provides methods for file size retrieval and appending content to S3 objects.
Implementations§
Source§impl S3Helpers
impl S3Helpers
Sourcepub async fn append_to_file(
client: &Client,
bucket: &str,
key: &str,
content_to_append: &str,
) -> Result<u64>
pub async fn append_to_file( client: &Client, bucket: &str, key: &str, content_to_append: &str, ) -> Result<u64>
Appends content to an existing S3 object or creates a new one if it doesn’t exist. Uses S3’s write_offset_bytes feature for efficient appending.
§Arguments
client
- The AWS S3 clientbucket
- The S3 bucket namekey
- The S3 object keycontent_to_append
- The content to append to the file
§Returns
Ok(u64)
- The total file size after appendingErr(anyhow::Error)
- If the append operation fails
Auto Trait Implementations§
impl Freeze for S3Helpers
impl RefUnwindSafe for S3Helpers
impl Send for S3Helpers
impl Sync for S3Helpers
impl Unpin for S3Helpers
impl UnwindSafe for S3Helpers
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.