Enum miasht::Method [] [src]

pub enum Method {
    Acl,
    BaselineControl,
    Bind,
    Checkin,
    Checkout,
    Connect,
    Copy,
    Delete,
    Get,
    Head,
    Label,
    Link,
    Lock,
    Merge,
    Mkactivity,
    Mkcalendar,
    Mkcol,
    Mkredirectref,
    Mkworkspace,
    Move,
    Options,
    Orderpatch,
    Patch,
    Post,
    Pri,
    Propfind,
    Proppatch,
    Put,
    Rebind,
    Report,
    Search,
    Trace,
    Unbind,
    Uncheckout,
    Unlink,
    Unlock,
    Update,
    Updateredirectref,
    VersionControl,
}

HTTP Method.

See IANA's HTTP Method Registry for more details about each method.

Examples

use miasht::Method;

assert_eq!(Method::try_from_str("GET"), Some(Method::Get));
assert_eq!(Method::try_from_str("get"), None); // case senstive

let method = Method::try_from_str("GET").unwrap();
assert_eq!(method.as_str(), "GET");
assert_eq!(method.to_string(), "GET");

Variants

Methods

impl Method
[src]

[src]

[src]

Trait Implementations

impl Debug for Method
[src]

[src]

Formats the value using the given formatter.

impl Clone for Method
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Method
[src]

impl PartialEq for Method
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for Method
[src]

impl Hash for Method
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Method
[src]

[src]

Formats the value using the given formatter. Read more