[][src]Enum srvrls::components::HttpMethod

pub enum HttpMethod {
    GET,
    POST,
    PUT,
    HEAD,
    DELETE,
    OTHER,
}

Replaces a String match with an enum that only includes the most common HttpMethods. This reduces overhead from trash methods like CONNECT, OPTIONS or TRACE as well as non-legit codes that are possible with Strings. Seriously, if you're using one of those you're probably just trolling your users.

Variants

GET

GET http method

POST

POST http method

PUT

PUT http method

HEAD

HEAD http method

DELETE

DELETE http method

OTHER

One of the other http methods not implemented here (intentionally, there is no reason to have 20 line match statements for the 1% of people using TRACE)

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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>,