[][src]Struct multipart::client::lazy::Multipart

pub struct Multipart<'n, 'd> { /* fields omitted */ }

A multipart request which writes all fields at once upon being provided an output stream.

Sacrifices static dispatch for support for dynamic construction. Reusable.

Lifetimes

  • 'n: Lifetime for field names; will only escape this struct in LazyIoError<'n>.
  • 'd: Lifetime for data: will only escape this struct in PreparedFields<'d>.

Methods

impl<'n, 'd> Multipart<'n, 'd>
[src]

Feature: hyper

Complete a POST request with the given hyper::client::Client and URL.

Supplies the fields in the body, optionally setting the content-length header if applicable (all added fields were text or files, i.e. no streams).

Feature: hyper

Complete a POST request with the given hyper::client::Client and URL; allows mutating the hyper::client::RequestBuilder via the passed closure.

Note that the body, and the ContentType and ContentLength headers will be overwritten, either by this method or by Hyper.

impl<'n, 'd> Multipart<'n, 'd>
[src]

Initialize a new lazy dynamic request.

Add a text field to this request.

Add a file field to this request.

Note

Does not check if path exists.

Add a generic stream field to this request,

Convert req to HttpStream, write out the fields in this request, and finish the request, returning the response if successful, or the first error encountered.

If any files were added by path they will now be opened for reading.

Export the multipart data contained in this lazy request as an adaptor which implements Read.

During this step, if any files were added by path then they will be opened for reading and their length measured.

Trait Implementations

impl<'n, 'd> Default for Multipart<'n, 'd>
[src]

impl<'n, 'd> Debug for Multipart<'n, 'd>
[src]

Auto Trait Implementations

impl<'n, 'd> !Send for Multipart<'n, 'd>

impl<'n, 'd> !Sync for Multipart<'n, 'd>

Blanket Implementations

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

impl<T> From for 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> BorrowMut for T where
    T: ?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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

Get the TypeId of this object.

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> UnsafeAny for T where
    T: Any