[][src]Struct multipart::mock::HttpBuffer

pub struct HttpBuffer {
    pub buf: Vec<u8>,
    pub boundary: String,
    pub content_len: Option<u64>,
    // some fields omitted
}

A writable buffer which stores the boundary and content-length, if provided.

Implements client::HttpStream if the client feature is enabled.

Fields

The buffer containing the raw bytes.

The multipart boundary.

The value of the content-length header, if set.

Methods

impl HttpBuffer
[src]

Important traits for HttpBuffer

Create an empty buffer with the given boundary and optional content-length.

Wrap the given buffer with the given boundary and optional content-length.

Important traits for ServerRequest<'a>

Get a ServerRequest wrapping the data in this buffer.

Trait Implementations

impl HttpStream for HttpBuffer
[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

Returns Ok(self).

impl Debug for HttpBuffer
[src]

impl Write for HttpBuffer
[src]

To simulate a network connection, this will copy a random number of bytes from buf to the buffer.

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 !Send for HttpBuffer

impl !Sync for HttpBuffer

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> DebugAny for T where
    T: Any + Debug

impl<T> UnsafeAny for T where
    T: Any