lexa_framework/routing/
mod.rs

1// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2// ┃ Copyright: (c) 2023, Mike 'PhiSyX' S. (https://github.com/PhiSyX)         ┃
3// ┃ SPDX-License-Identifier: MPL-2.0                                          ┃
4// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
5// ┃                                                                           ┃
6// ┃  This Source Code Form is subject to the terms of the Mozilla Public      ┃
7// ┃  License, v. 2.0. If a copy of the MPL was not distributed with this      ┃
8// ┃  file, You can obtain one at https://mozilla.org/MPL/2.0/.                ┃
9// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
10
11mod collection;
12pub(crate) mod interface;
13mod route;
14mod router;
15
16pub use self::collection::RouteCollection;
17pub use self::interface::RouterExt;
18pub use self::route::Route;
19pub use self::router::Router;
20
21// ---- //
22// Type //
23// ---- //
24
25pub type AxumRouter<S> = axum::Router<crate::state::State<S>>;
26
27// ----------- //
28// Énumération //
29// ----------- //
30
31#[derive(Debug)]
32#[derive(Copy, Clone)]
33#[derive(serde::Deserialize)]
34pub enum Method {
35	DELETE,
36	GET,
37	HEAD,
38	OPTIONS,
39	PATCH,
40	POST,
41	PUT,
42	TRACE,
43}