[][src]Struct twilight_http::request::Request

pub struct Request {
    pub body: Option<Vec<u8>>,
    pub form: Option<Form>,
    pub headers: Option<HeaderMap<HeaderValue>>,
    pub method: Method,
    pub path: Path,
    pub path_str: Cow<'static, str>,
}

Fields

body: Option<Vec<u8>>

The body of the request, if any.

form: Option<Form>

The multipart form of the request, if any.

headers: Option<HeaderMap<HeaderValue>>

The headers to set in the request, if any.

method: Method

The method of the request.

path: Path

The ratelimiting bucket path.

path_str: Cow<'static, str>

The URI path to request.

Implementations

impl Request[src]

pub fn new(
    body: Option<Vec<u8>>,
    headers: Option<HeaderMap<HeaderValue>>,
    route: Route
) -> Self
[src]

Create a simple Request with basic information.

Use the various From implementations for different combinations of configurations.

Trait Implementations

impl Debug for Request[src]

impl From<(Form, Route)> for Request[src]

impl From<(HeaderMap<HeaderValue>, Route)> for Request[src]

impl From<(Vec<u8, Global>, Form, Route)> for Request[src]

impl From<(Vec<u8, Global>, HeaderMap<HeaderValue>, Route)> for Request[src]

impl From<(Vec<u8, Global>, Route)> for Request[src]

impl From<Route> for Request[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,