pub struct S3Response<T> {
pub output: T,
pub status: Option<StatusCode>,
pub headers: HeaderMap,
pub extensions: Extensions,
}Expand description
S3 response
Fields§
§output: TS3 operation output
status: Option<StatusCode>HTTP status code. This field overrides the status code implied by the output.
headers: HeaderMapHTTP headers. This field overrides the headers implied by the output.
extensions: ExtensionsResponse extensions. This is used to pass custom data between middlewares.
Implementations§
Source§impl<T> S3Response<T>
impl<T> S3Response<T>
Sourcepub fn with_status(output: T, status: StatusCode) -> Self
pub fn with_status(output: T, status: StatusCode) -> Self
Create a new S3 response with the given output and status code.
Sourcepub fn with_headers(output: T, headers: HeaderMap) -> Self
pub fn with_headers(output: T, headers: HeaderMap) -> Self
Create a new S3 response with the given output and headers.
Sourcepub fn map_output<U>(self, f: impl FnOnce(T) -> U) -> S3Response<U>
pub fn map_output<U>(self, f: impl FnOnce(T) -> U) -> S3Response<U>
Map the output of the response to a new type.
Trait Implementations§
Source§impl<T: Clone> Clone for S3Response<T>
impl<T: Clone> Clone for S3Response<T>
Source§fn clone(&self) -> S3Response<T>
fn clone(&self) -> S3Response<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> !RefUnwindSafe for S3Response<T>
impl<T> !UnwindSafe for S3Response<T>
impl<T> Freeze for S3Response<T>where
T: Freeze,
impl<T> Send for S3Response<T>where
T: Send,
impl<T> Sync for S3Response<T>where
T: Sync,
impl<T> Unpin for S3Response<T>where
T: Unpin,
impl<T> UnsafeUnpin for S3Response<T>where
T: UnsafeUnpin,
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