Struct aws_smithy_http::body::SdkBody [−][src]
pub struct SdkBody { /* fields omitted */ }
Expand description
SdkBody type
This is the Body used for dispatching all HTTP Requests. For handling responses, the type of the body will be controlled by the HTTP stack.
TODO: Consider renaming to simply Body
, although I’m concerned about naming headaches
between hyper::Body and our Body
Implementations
Construct an SdkBody from a Boxed implementation of http::Body
Construct an explicitly retryable SDK body
Note: This is probably not what you want
All bodies constructed from in-memory data (String
, Vec<u8>
, Bytes
, etc.) will be
retryable out of the box. If you want to read data from a file, you should use
ByteStream::from_path
. This function
is only necessary when you need to enable retries for your own streaming container.
If possible, return a reference to this body as &[u8]
If this SdkBody is NOT streaming, this will return the byte slab
If this SdkBody is streaming, this will return None
Trait Implementations
Attempt to pull out the next data buffer of this stream.
Poll for an optional single HeaderMap
of trailers. Read more
Returns true
when the end of stream has been reached. Read more
Returns the bounds on the remaining length of the stream. Read more
Returns future that resolves to next data chunk, if any.
Returns future that resolves to trailers, if any.
Maps this body’s data value to a different value.
Maps this body’s error value to a different value.
Turn this body into a boxed trait object.
Turn this body into a boxed trait object that is !Sync.
Auto Trait Implementations
impl !RefUnwindSafe for SdkBody
impl !UnwindSafe for SdkBody
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more