pub struct ArcStorageHelper { /* private fields */ }Expand description
Helper functions for storage operations in ARC server
Implementations§
Source§impl ArcStorageHelper
impl ArcStorageHelper
pub fn new(storage: Arc<dyn Storage>) -> Self
Sourcepub async fn generate_params_put_url(
&self,
command_id: &str,
expires_in: Duration,
) -> Result<String>
pub async fn generate_params_put_url( &self, command_id: &str, expires_in: Duration, ) -> Result<String>
Generate a presigned PUT URL for command params upload
Sourcepub async fn generate_params_get_url(
&self,
command_id: &str,
expires_in: Duration,
) -> Result<String>
pub async fn generate_params_get_url( &self, command_id: &str, expires_in: Duration, ) -> Result<String>
Generate a presigned GET URL for command params download
Sourcepub async fn generate_response_put_url(
&self,
command_id: &str,
expires_in: Duration,
) -> Result<String>
pub async fn generate_response_put_url( &self, command_id: &str, expires_in: Duration, ) -> Result<String>
Generate a presigned PUT URL for response body upload
Sourcepub async fn generate_response_get_url(
&self,
command_id: &str,
expires_in: Duration,
) -> Result<String>
pub async fn generate_response_get_url( &self, command_id: &str, expires_in: Duration, ) -> Result<String>
Generate a presigned GET URL for response body download
Sourcepub async fn cleanup_command_storage(&self, command_id: &str) -> Result<()>
pub async fn cleanup_command_storage(&self, command_id: &str) -> Result<()>
Clean up storage objects for a completed command
Sourcepub fn get_base_url(&self) -> String
pub fn get_base_url(&self) -> String
Get the base storage URL for this binding
Auto Trait Implementations§
impl Freeze for ArcStorageHelper
impl !RefUnwindSafe for ArcStorageHelper
impl Send for ArcStorageHelper
impl Sync for ArcStorageHelper
impl Unpin for ArcStorageHelper
impl UnsafeUnpin for ArcStorageHelper
impl !UnwindSafe for ArcStorageHelper
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.