1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Shuttle service integration for the Salvo web framework.
//! ## Example
//! ```rust,no_run
//! use salvo::prelude::*;
//!
//! #[handler]
//! async fn hello_world(res: &mut Response) {
//! res.render(Text::Plain("Hello, world!"));
//! }
//!
//! #[shuttle_runtime::main]
//! async fn salvo() -> shuttle_salvo::ShuttleSalvo {
//! let router = Router::new().get(hello_world);
//!
//! Ok(router.into())
//! }
//!
//! ```
use Listener;
use Error;
use SocketAddr;
/// A wrapper type for [salvo::Router] so we can implement [shuttle_runtime::Service] for it.
;
/// Return type from the `[shuttle_runtime::main]` macro for a Salvo-based service.
///
/// # Example
///
/// ```rust,no_run
/// use salvo::prelude::*;
/// use shuttle_salvo::ShuttleSalvo;
///
/// #[handler]
/// async fn hello_world(res: &mut Response) {
/// res.render(Text::Plain("Hello, world!"));
/// }
///
/// #[shuttle_runtime::main]
/// async fn salvo() -> ShuttleSalvo {
/// let router = Router::with_path("hello").get(hello_world);
///
/// Ok(router.into())
/// }
/// ```
pub type ShuttleSalvo = ;