pub struct SdkBody { /* private fields */ }
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.

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§

Values yielded by the Body.
The error type this Body might generate.
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.
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
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