RESTinio

Public Member Functions | List of all members
restinio::router::method_matcher_t Struct Referenceabstract

An interface of method_matcher. More...

`#include <method_matcher.hpp>`

Inheritance diagram for restinio::router::method_matcher_t:

## Public Member Functions
| method_matcher_t (const method_matcher_t &)=default
method_matcher_t & | operator= (const method_matcher_t &)=default
| method_matcher_t (method_matcher_t &&)=default
method_matcher_t & | operator= (method_matcher_t &&)=default
| method_matcher_t ()=default
virtual | ~method_matcher_t ()=default
virtual RESTINIO_NODISCARD bool | match (const http_method_id_t &method) const noexcept=0
| Is the specified method can be applied to a route? More...

## Detailed Description

An interface of method_matcher.

Method_matchers are used by routers to detect an applicability of an incoming request to a route. If method_matcher_t::match() returns `true` then HTTP method from an incoming request is applicable to a route.

Since
  v.0.6.6

Definition at line 38 of file method_matcher.hpp.

## Constructor & Destructor Documentation

## ◆ method_matcher_t() [1/3]

restinio::router::method_matcher_t::method_matcher_t | ( | const method_matcher_t & |  | ) |
| default

## ◆ method_matcher_t() [2/3]

restinio::router::method_matcher_t::method_matcher_t | ( | method_matcher_t && |  | ) |
| default

## ◆ method_matcher_t() [3/3]

restinio::router::method_matcher_t::method_matcher_t | ( |  | ) |
| default

## ◆ ~method_matcher_t()

virtual restinio::router::method_matcher_t::~method_matcher_t | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ match()

virtual RESTINIO_NODISCARD bool restinio::router::method_matcher_t::match | ( | const http_method_id_t & | method | ) | const
| pure virtual noexcept

Is the specified method can be applied to a route?

Return values

  true | if method can be applied to a route.
  false | if method can't be applied to a route.

Implemented in restinio::router::impl::allocated_matcher_proxy_t< Matcher >, restinio::router::impl::simple_matcher_t, restinio::router::impl::fixed_size_any_of_matcher_t< Size >, restinio::router::impl::fixed_size_none_of_matcher_t< Size >, restinio::router::dynamic_any_of_methods_matcher_t, and restinio::router::dynamic_none_of_methods_matcher_t.

## ◆ operator=() [1/2]

method_matcher_t & restinio::router::method_matcher_t::operator= | ( | const method_matcher_t & |  | ) |
| default

## ◆ operator=() [2/2]

method_matcher_t & restinio::router::method_matcher_t::operator= | ( | method_matcher_t && |  | ) |
| default

The documentation for this struct was generated from the following file:

- restinio/router/method_matcher.hpp