[][src]Struct multipart::client::SizedRequest

pub struct SizedRequest<R> { /* fields omitted */ }

A wrapper around a request object that measures the request body and sets the Content-Length header to its size in bytes.

Sized requests are more human-readable and use less bandwidth (as chunking adds visual noise and overhead), but they must be able to load their entirety, including the contents of all files and streams, into memory so the request body can be measured.

You should really only use sized requests if you intend to inspect the data manually on the server side, as it will produce a more human-readable request body. Also, of course, if the server doesn't support chunked requests or otherwise rejects them.

Trait Implementations

impl<R: HttpRequest> HttpRequest for SizedRequest<R> where
    <R::Stream as HttpStream>::Error: From<R::Error>, 
[src]

The HTTP stream type that can be opend by this request, to which the multipart data will be written. Read more

The error type for this request. Must be compatible with io::Error as well as Self::HttpStream::Error Read more

SizedRequest ignores _content_len because it sets its own later.

impl<R: HttpRequest> HttpStream for SizedRequest<R> where
    <R::Stream as HttpStream>::Error: From<R::Error>, 
[src]

The request type that opened this stream.

The response type that will be returned after the request is completed.

The error type for this stream. Must be compatible with io::Error as well as Self::Request::Error. Read more

impl<R> Write for SizedRequest<R>
[src]

Attempts to write an entire buffer into this write. Read more

Writes a formatted string into this writer, returning any error encountered. Read more

Creates a "by reference" adaptor for this instance of Write. Read more

Auto Trait Implementations

impl<R> Send for SizedRequest<R> where
    R: Send

impl<R> Sync for SizedRequest<R> where
    R: Sync

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Typeable for T where
    T: Any

Get the TypeId of this object.

impl<W> WriteBytesExt for W where
    W: Write + ?Sized

Writes an unsigned 8 bit integer to the underlying writer. Read more

Writes a signed 8 bit integer to the underlying writer. Read more

Writes an unsigned 16 bit integer to the underlying writer. Read more

Writes a signed 16 bit integer to the underlying writer. Read more

Writes an unsigned 24 bit integer to the underlying writer. Read more

Writes a signed 24 bit integer to the underlying writer. Read more

Writes an unsigned 32 bit integer to the underlying writer. Read more

Writes a signed 32 bit integer to the underlying writer. Read more

Writes an unsigned 48 bit integer to the underlying writer. Read more

Writes a signed 48 bit integer to the underlying writer. Read more

Writes an unsigned 64 bit integer to the underlying writer. Read more

Writes a signed 64 bit integer to the underlying writer. Read more

Writes an unsigned n-bytes integer to the underlying writer. Read more

Writes a signed n-bytes integer to the underlying writer. Read more

Writes a IEEE754 single-precision (4 bytes) floating point number to the underlying writer. Read more

Writes a IEEE754 double-precision (8 bytes) floating point number to the underlying writer. Read more

impl<T> UnsafeAny for T where
    T: Any