Skip to main content

MethodExt

Trait MethodExt 

Source
pub trait MethodExt {
    // Required methods
    fn is_allowed(&self) -> bool;
    fn is_get(&self) -> bool;
    fn is_head(&self) -> bool;
    fn is_options(&self) -> bool;
}
Expand description

SWS HTTP Method extensions trait.

Required Methods§

Source

fn is_allowed(&self) -> bool

If method is allowed.

Source

fn is_get(&self) -> bool

If method is GET.

Source

fn is_head(&self) -> bool

If method is HEAD.

Source

fn is_options(&self) -> bool

If method is OPTIONS.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MethodExt for Method

Source§

fn is_allowed(&self) -> bool

Checks if the HTTP method is allowed (supported) by SWS.

Source§

fn is_get(&self) -> bool

Checks if the HTTP method is GET.

Source§

fn is_head(&self) -> bool

Checks if the HTTP method is HEAD.

Source§

fn is_options(&self) -> bool

Checks if the HTTP method is OPTIONS.

Implementors§